author | Claus Gittinger <cg@exept.de> |
Tue, 24 Apr 2018 21:30:43 +0200 | |
changeset 4238 | 426bf2a5a3aa |
parent 4185 | e178b64ce95d |
child 4239 | 18d2206e2674 |
permissions | -rw-r--r-- |
4238 | 1 |
"{ Encoding: utf8 }" |
2 |
||
1634 | 3 |
" |
4 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
5 |
COPYRIGHT (c) 2005 by eXept Software AG |
|
3396 | 6 |
All Rights Reserved |
1634 | 7 |
|
8 |
This software is furnished under a license and may be used |
|
9 |
only in accordance with the terms of that license and with the |
|
10 |
inclusion of the above copyright notice. This software may not |
|
11 |
be provided or otherwise made available to, or used by, any |
|
12 |
other person. No title to or ownership of the software is |
|
13 |
hereby transferred. |
|
14 |
" |
|
3576 | 15 |
"{ Package: 'stx:libcomp' }" |
16 |
||
17 |
"{ NameSpace: Smalltalk }" |
|
18 |
||
19 |
Object subclass:#ParserFlags |
|
20 |
instanceVariableNames:'warnings warnUnusedVars warnUndeclared warnST80Directives |
|
21 |
warnSTXHereExtensionUsed warnSTXSpecialComment |
|
22 |
warnUnderscoreInIdentifier warnOldStyleAssignment |
|
23 |
warnCommonMistakes warnSTXNameSpaceUse |
|
24 |
warnPossibleIncompatibilities warnDollarInIdentifier |
|
4041 | 25 |
warnParagraphInIdentifier warnHiddenVariables |
26 |
warnAboutVariableNameConventions warnAboutWrongVariableNames |
|
27 |
warnAboutBadComments warnInconsistentReturnValues |
|
3576 | 28 |
warnAboutNonLowercaseLocalVariableNames |
29 |
warnAboutPossibleSTCCompilationProblems |
|
30 |
warnAboutReferenceToPrivateClass warnAboutShortLocalVariableNames |
|
31 |
warnAboutPossiblyUnimplementedSelectors |
|
32 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
|
33 |
warnPlausibilityChecks allowLiteralNameSpaceSymbols |
|
34 |
allowUnderscoreInIdentifier allowDollarInIdentifier |
|
4041 | 35 |
allowParagraphInIdentifier allowOldStyleAssignment |
36 |
allowSqueakExtensions allowDolphinExtensions |
|
37 |
allowExtendedBinarySelectors allowQualifiedNames |
|
38 |
allowFunctionCallSyntaxForBlockEvaluation |
|
3576 | 39 |
allowLocalVariableDeclarationWithInitializerExpression |
40 |
allowDomainVariables allowArrayIndexSyntaxExtension |
|
41 |
allowReservedWordsAsSelectors allowVariableReferences |
|
42 |
allowLazyValueExtension allowFixedPointLiterals |
|
43 |
allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals |
|
44 |
allowExtensionsToPrivateClasses allowSqueakPrimitives |
|
45 |
allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions |
|
46 |
allowNationalCharactersInIdentifier allowHashAsBinarySelector |
|
47 |
allowSTXEOLComments allowEmptyStatements |
|
48 |
allowVisualWorksMethodAnnotations |
|
49 |
allowPossibleSTCCompilationProblems arraysAreImmutable |
|
50 |
stringsAreImmutable implicitSelfSends stcKeepCIntermediate |
|
51 |
stcKeepOIntermediate stcKeepSTIntermediate stcModulePath |
|
52 |
stcCompilation stcCompilationIncludes stcCompilationDefines |
|
53 |
stcCompilationOptions stcPath ccCompilationOptions ccPath |
|
54 |
linkArgs linkSharedArgs linkCommand libPath searchedLibraries |
|
55 |
warnAboutPeriodInSymbol allowPeriodInSymbol allowCaretAsBinop |
|
56 |
allowUnicodeStrings allowUnicodeCharacters allowCharacterEscapes |
|
57 |
allowStringEscapes allowAssignmentToBlockArgument |
|
58 |
allowAssignmentToMethodArgument allowAssignmentToPoolVariable |
|
59 |
lineNumberInfo allowSTXDelimiterComments |
|
3945 | 60 |
allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument |
4085 | 61 |
warnAssignmentToMethodArgument warnAssignmentToPoolVariable |
4185 | 62 |
allowSignedByteArrayElements allowSymbolsStartingWithDigit |
63 |
allowJavaScriptConst' |
|
4043 | 64 |
classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument |
65 |
AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable |
|
66 |
AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier |
|
67 |
AllowDolphinExtensions AllowDomainVariables AllowEmptyStatements |
|
68 |
AllowExtendedBinarySelectors AllowExtendedSTXSyntax |
|
69 |
AllowExtensionsToPrivateClasses AllowFixedPointLiterals |
|
70 |
AllowFunctionCallSyntaxForBlockEvaluation |
|
71 |
AllowHashAsBinarySelector AllowLazyValueExtension |
|
72 |
AllowLiteralNameSpaceSymbols |
|
3576 | 73 |
AllowLocalVariableDeclarationWithInitializerExpression |
4043 | 74 |
AllowNationalCharactersInIdentifier AllowOldStyleAssignment |
75 |
AllowParagraphInIdentifier AllowPeriodInSymbol |
|
76 |
AllowPossibleSTCCompilationProblems AllowQualifiedNames |
|
77 |
AllowReservedWordsAsSelectors AllowSTVExtensions |
|
78 |
AllowSTVPrimitives AllowSTXDelimiterComments AllowSTXEOLComments |
|
79 |
AllowSTXExtendedArrayLiterals AllowSqueakExtensions |
|
80 |
AllowSqueakPrimitives AllowStringEscapes |
|
81 |
AllowUnderscoreInIdentifier AllowUnicodeCharacters |
|
82 |
AllowUnicodeStrings AllowVariableReferences |
|
83 |
AllowVisualAgeESSymbolLiterals AllowVisualAgePrimitives |
|
84 |
AllowVisualWorksMethodAnnotations ArraysAreImmutable BCCTop |
|
85 |
CCCompilationOptions CCPath DefineForBorlandC DefineForCLANG |
|
86 |
DefineForGNUC DefineForMINGW DefineForMINGW32 DefineForMINGW64 |
|
87 |
DefineForMSC DefineForVisualC ForcedCompiler ImplicitSelfSends |
|
88 |
LibDirectory LibPath LineNumberInfo LinkArgs LinkCommand |
|
89 |
LinkSharedArgs MakeCommand MingwTop PerMethodFlags SDKTop |
|
90 |
STCCompilation STCCompilationDefines STCCompilationIncludes |
|
91 |
STCCompilationOptions STCKeepCIntermediate STCKeepOIntermediate |
|
92 |
STCKeepSTIntermediate STCModulePath STCPath SearchedLibraries |
|
93 |
StringsAreImmutable VCTop WarnAboutBadComments |
|
94 |
WarnAboutNonLowercaseLocalVariableNames WarnAboutPeriodInSymbol |
|
95 |
WarnAboutPossibleSTCCompilationProblems |
|
96 |
WarnAboutPossiblyUnimplementedSelectors |
|
97 |
WarnAboutReferenceToPrivateClass WarnAboutShortLocalVariableNames |
|
98 |
WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
|
99 |
WarnAboutVariableNameConventions WarnAboutWrongVariableNames |
|
100 |
WarnAssignmentToBlockArgument WarnAssignmentToMethodArgument |
|
101 |
WarnAssignmentToPoolVariable WarnCommonMistakes |
|
102 |
WarnDollarInIdentifier WarnHiddenVariables |
|
103 |
WarnInconsistentReturnValues WarnOldStyleAssignment |
|
104 |
WarnParagraphInIdentifier WarnPlausibilityChecks |
|
105 |
WarnPossibleIncompatibilities WarnST80Directives WarnSTXSpecials |
|
4050 | 106 |
WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings |
4149 | 107 |
AutoDefineVariables AllowSignedByteArrayElements |
4238 | 108 |
AllowSymbolsStartingWithDigit AllowJavaScriptConst |
109 |
AllowJavaScriptLet' |
|
3576 | 110 |
poolDictionaries:'' |
111 |
category:'System-Compiler' |
|
112 |
! |
|
1634 | 113 |
|
114 |
!ParserFlags class methodsFor:'documentation'! |
|
115 |
||
116 |
copyright |
|
117 |
" |
|
118 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
119 |
COPYRIGHT (c) 2005 by eXept Software AG |
|
3396 | 120 |
All Rights Reserved |
1634 | 121 |
|
122 |
This software is furnished under a license and may be used |
|
123 |
only in accordance with the terms of that license and with the |
|
124 |
inclusion of the above copyright notice. This software may not |
|
125 |
be provided or otherwise made available to, or used by, any |
|
126 |
other person. No title to or ownership of the software is |
|
127 |
hereby transferred. |
|
128 |
" |
|
129 |
! |
|
130 |
||
131 |
documentation |
|
132 |
" |
|
133 |
compiler flags (used to be defined in Scanner and Parser) have been extracted for easier |
|
134 |
individual-method customization (using ST as scripting). |
|
1711 | 135 |
|
3945 | 136 |
The class side provides correspondingly-named variables, which hold the default values. |
137 |
||
1712 | 138 |
howTo_fileInVSE: |
3945 | 139 |
ParserFlags allowSTVExtensions:true. |
140 |
ParserFlags allowSTVPrimitives:true. |
|
141 |
ParserFlags allowSTXEOLComments:false. |
|
2488 | 142 |
|
143 |
for stx debugging: |
|
3945 | 144 |
STCKeepCIntermediate := true |
2488 | 145 |
|
1711 | 146 |
" |
1634 | 147 |
! ! |
148 |
||
149 |
!ParserFlags class methodsFor:'instance creation'! |
|
150 |
||
151 |
new |
|
152 |
^ self basicNew initialize |
|
153 |
! ! |
|
154 |
||
155 |
!ParserFlags class methodsFor:'accessing-compilation control'! |
|
156 |
||
1668 | 157 |
allowExtensionsToPrivateClasses |
158 |
^ AllowExtensionsToPrivateClasses |
|
159 |
! |
|
160 |
||
161 |
allowExtensionsToPrivateClasses:aBoolean |
|
162 |
AllowExtensionsToPrivateClasses := aBoolean |
|
163 |
! |
|
164 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
165 |
allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
166 |
^ AllowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
167 |
|
3546 | 168 |
" |
169 |
self allowPossibleSTCCompilationProblems:true |
|
170 |
self allowPossibleSTCCompilationProblems:false |
|
171 |
||
172 |
self warnAboutPossibleSTCCompilationProblems |
|
173 |
" |
|
174 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
175 |
"Created: / 16-11-2006 / 14:31:36 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
176 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
177 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
178 |
allowPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
179 |
AllowPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
180 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
181 |
"Created: / 16-11-2006 / 14:31:40 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
182 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
183 |
|
1634 | 184 |
arraysAreImmutable |
3219 | 185 |
"return true if arrays and byteArrays are compiled as immutable literals" |
1634 | 186 |
|
187 |
^ ArraysAreImmutable |
|
188 |
! |
|
189 |
||
190 |
arraysAreImmutable:aBoolean |
|
3219 | 191 |
"turn on/off immutable array and byteArrays literals - default is false for ST-80 compatibilty." |
1634 | 192 |
|
193 |
ArraysAreImmutable := aBoolean. |
|
194 |
||
195 |
" |
|
196 |
can be added to your private.rc file: |
|
197 |
||
3396 | 198 |
ParserFlags arraysAreImmutable:true |
199 |
ParserFlags arraysAreImmutable:false |
|
1634 | 200 |
" |
201 |
! |
|
202 |
||
2927 | 203 |
fullLineNumberInfo |
204 |
^ (self lineNumberInfo == #full) |
|
205 |
||
206 |
"Created: / 26-09-2012 / 14:16:09 / cg" |
|
207 |
! |
|
208 |
||
1634 | 209 |
implicitSelfSends |
210 |
"return true if undefined variables with |
|
211 |
lowercase first character are to be turned |
|
212 |
into implicit self sends" |
|
213 |
||
214 |
^ ImplicitSelfSends |
|
215 |
! |
|
216 |
||
217 |
implicitSelfSends:aBoolean |
|
218 |
"turn on/off implicit self sends" |
|
219 |
||
220 |
ImplicitSelfSends := aBoolean |
|
221 |
||
222 |
" |
|
223 |
Compiler implicitSelfSends:true |
|
3396 | 224 |
Compiler implicitSelfSends:false |
1634 | 225 |
" |
226 |
! |
|
227 |
||
2927 | 228 |
lineNumberInfo |
229 |
^ LineNumberInfo |
|
230 |
||
231 |
"Created: / 26-09-2012 / 13:27:34 / cg" |
|
232 |
! |
|
233 |
||
234 |
lineNumberInfo:aSymbol |
|
235 |
LineNumberInfo := aSymbol. |
|
236 |
||
237 |
"Created: / 26-09-2012 / 13:27:54 / cg" |
|
238 |
! |
|
239 |
||
1634 | 240 |
stringsAreImmutable |
241 |
"return true if strings are immutable literals" |
|
242 |
||
243 |
^ StringsAreImmutable |
|
244 |
||
245 |
"Created: / 3.8.1998 / 14:53:25 / cg" |
|
246 |
! |
|
247 |
||
248 |
stringsAreImmutable:aBoolean |
|
249 |
"turn on/off immutable string literals - default is false for ST-80 compatibilty." |
|
250 |
||
251 |
StringsAreImmutable := aBoolean. |
|
252 |
||
253 |
" |
|
254 |
can be added to your private.rc file: |
|
255 |
||
3396 | 256 |
ParserFlags stringsAreImmutable:true |
257 |
ParserFlags stringsAreImmutable:false |
|
1634 | 258 |
" |
259 |
||
260 |
"Created: / 3.8.1998 / 14:53:28 / cg" |
|
261 |
! ! |
|
262 |
||
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
263 |
!ParserFlags class methodsFor:'accessing-per method flags'! |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
264 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
265 |
disableFlag:flagName forClass:class selector:selector |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
266 |
"remember that warnings named flagName (such as #warnUnusedVars) |
3396 | 267 |
are disabled for a particular method. |
268 |
Sent if user wants to disable warnings in the future |
|
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
269 |
(try defining a method with an unused var, to see)" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
270 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
271 |
|key| |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
272 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
273 |
PerMethodFlags isNil ifTrue:[ |
3396 | 274 |
PerMethodFlags := Dictionary new. |
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
275 |
]. |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
276 |
key := class name, '>>',selector. |
2852 | 277 |
PerMethodFlags at:key put:(Timestamp now + self perMethodDisableWarningTimeDuration). |
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
278 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
279 |
"Created: / 28-02-2012 / 12:57:45 / cg" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
280 |
! |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
281 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
282 |
isFlag:flagName enabledForClass:class selector:selector |
3295 | 283 |
"return true, if warnings named <flagName> (such as #warnUnusedVars) |
2852 | 284 |
are to be suppressed for a particular method." |
285 |
||
286 |
|key endTime| |
|
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
287 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
288 |
PerMethodFlags isNil ifTrue:[^ true]. |
2830 | 289 |
class isNil ifTrue:[^ true]. |
290 |
selector isNil ifTrue:[^ true]. |
|
291 |
||
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
292 |
key := class name, '>>',selector. |
2852 | 293 |
endTime := PerMethodFlags at:key ifAbsent:nil. |
294 |
endTime isNil ifTrue:[^ true]. |
|
295 |
endTime > Timestamp now ifTrue:[^ false]. |
|
296 |
PerMethodFlags removeKey:key. |
|
297 |
^ true |
|
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
298 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
299 |
"Created: / 28-02-2012 / 12:57:30 / cg" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
300 |
! |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
301 |
|
2852 | 302 |
perMethodDisableWarningTimeDuration |
303 |
"when the user wants to suppress a particular warning for a particular |
|
304 |
method, it will be only suppressed for some time duration. |
|
305 |
After that, the suppress will automatically be removed, and normal warnings |
|
306 |
are issued again." |
|
307 |
||
308 |
^ 30 minutes |
|
309 |
||
310 |
"Created: / 08-03-2012 / 10:22:57 / cg" |
|
311 |
! |
|
312 |
||
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
313 |
reenableAllSuppressedFlags |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
314 |
"turn off any suppressed warnings" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
315 |
|
2830 | 316 |
PerMethodFlags := nil |
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
317 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
318 |
"Created: / 28-02-2012 / 12:59:08 / cg" |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
319 |
! ! |
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
320 |
|
1658 | 321 |
!ParserFlags class methodsFor:'accessing-stc compilation control'! |
322 |
||
2645 | 323 |
bccTop:aPath |
324 |
"windows only: define the borland-C installation directory. |
|
325 |
must contain bin\bcc32.exe and include. |
|
326 |
Typically, something like 'C:\borland\bcc55'" |
|
327 |
||
328 |
BCCTop := aPath |
|
329 |
||
330 |
"Created: / 08-08-2011 / 22:41:48 / cg" |
|
331 |
! |
|
332 |
||
1658 | 333 |
ccCompilationOptions |
1668 | 334 |
^ CCCompilationOptions ? '' |
1658 | 335 |
! |
336 |
||
337 |
ccCompilationOptions:aString |
|
338 |
CCCompilationOptions := aString |
|
339 |
! |
|
340 |
||
341 |
ccPath |
|
342 |
^ CCPath |
|
343 |
! |
|
344 |
||
345 |
ccPath:aSymbol |
|
346 |
CCPath := aSymbol |
|
347 |
! |
|
348 |
||
2626 | 349 |
libDirectory |
350 |
^ LibDirectory |
|
351 |
||
352 |
"Created: / 07-08-2011 / 14:01:21 / cg" |
|
353 |
! |
|
354 |
||
355 |
libDirectory:aString |
|
356 |
LibDirectory := aString |
|
357 |
||
358 |
"Created: / 07-08-2011 / 14:01:28 / cg" |
|
359 |
! |
|
360 |
||
1658 | 361 |
libPath |
362 |
^ LibPath |
|
363 |
! |
|
364 |
||
365 |
libPath:aString |
|
366 |
LibPath := aString |
|
367 |
! |
|
368 |
||
369 |
linkArgs |
|
370 |
^ LinkArgs |
|
371 |
! |
|
372 |
||
373 |
linkArgs:aString |
|
374 |
LinkArgs := aString |
|
375 |
! |
|
376 |
||
377 |
linkCommand |
|
378 |
^ LinkCommand |
|
379 |
! |
|
380 |
||
381 |
linkCommand:aString |
|
382 |
LinkCommand := aString |
|
383 |
! |
|
384 |
||
1898 | 385 |
linkSharedArgs |
386 |
^ LinkSharedArgs |
|
387 |
! |
|
388 |
||
389 |
linkSharedArgs:aString |
|
390 |
LinkSharedArgs := aString |
|
2829
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
391 |
|
c4b600d7f96d
support per-method warning suppression
Claus Gittinger <cg@exept.de>
parents:
2805
diff
changeset
|
392 |
"Modified (format): / 28-02-2012 / 13:34:58 / cg" |
1898 | 393 |
! |
394 |
||
1814 | 395 |
makeCommand |
396 |
^ MakeCommand |
|
397 |
||
398 |
"Created: / 09-08-2006 / 18:45:04 / fm" |
|
399 |
! |
|
400 |
||
401 |
makeCommand:aString |
|
402 |
MakeCommand := aString |
|
403 |
||
404 |
"Created: / 09-08-2006 / 18:45:12 / fm" |
|
405 |
! |
|
406 |
||
2645 | 407 |
sdkTop:aPath |
408 |
"windows only: define the SDK top directory. |
|
409 |
must include folder with windows header files. |
|
410 |
Typically something like 'C:\Program Files\Microsoft SDKs\Windows\v6.0A'" |
|
411 |
||
412 |
SDKTop := aPath |
|
413 |
||
414 |
"Created: / 08-08-2011 / 22:39:24 / cg" |
|
415 |
! |
|
416 |
||
1658 | 417 |
searchedLibraries |
418 |
^ SearchedLibraries |
|
419 |
! |
|
420 |
||
421 |
searchedLibraries:aString |
|
422 |
SearchedLibraries := aString |
|
423 |
! |
|
424 |
||
425 |
stcCompilation |
|
426 |
^ STCCompilation |
|
427 |
! |
|
428 |
||
429 |
stcCompilation:aSymbol |
|
430 |
STCCompilation := aSymbol |
|
431 |
! |
|
432 |
||
433 |
stcCompilationDefines |
|
434 |
^ STCCompilationDefines |
|
435 |
! |
|
436 |
||
437 |
stcCompilationDefines:aString |
|
438 |
STCCompilationDefines := aString |
|
439 |
! |
|
440 |
||
441 |
stcCompilationIncludes |
|
442 |
^ STCCompilationIncludes |
|
443 |
! |
|
444 |
||
445 |
stcCompilationIncludes:aString |
|
446 |
STCCompilationIncludes := aString |
|
447 |
! |
|
448 |
||
449 |
stcCompilationOptions |
|
450 |
^ STCCompilationOptions |
|
451 |
! |
|
452 |
||
453 |
stcCompilationOptions:aString |
|
454 |
STCCompilationOptions := aString |
|
455 |
! |
|
456 |
||
457 |
stcKeepCIntermediate |
|
2701
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
458 |
^ STCKeepCIntermediate ? false |
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
459 |
|
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
460 |
"Modified: / 16-09-2011 / 19:56:18 / cg" |
1658 | 461 |
! |
462 |
||
4089 | 463 |
stcKeepCIntermediate:aBoolean |
464 |
STCKeepCIntermediate := aBoolean. |
|
1940 | 465 |
|
466 |
" |
|
467 |
STCKeepCIntermediate := true. |
|
468 |
STCKeepCIntermediate := false. |
|
469 |
" |
|
470 |
||
471 |
"Modified: / 07-11-2006 / 10:58:42 / cg" |
|
1658 | 472 |
! |
473 |
||
474 |
stcKeepOIntermediate |
|
2702 | 475 |
^ STCKeepOIntermediate ? false |
476 |
||
477 |
"Modified: / 16-09-2011 / 19:56:49 / cg" |
|
1658 | 478 |
! |
479 |
||
4089 | 480 |
stcKeepOIntermediate:aBoolean |
481 |
STCKeepOIntermediate := aBoolean. |
|
482 |
||
483 |
" |
|
484 |
STCKeepOIntermediate := true. |
|
485 |
STCKeepOIntermediate := false. |
|
486 |
" |
|
1658 | 487 |
! |
488 |
||
489 |
stcKeepSTIntermediate |
|
2702 | 490 |
^ STCKeepSTIntermediate ? false |
2142 | 491 |
|
492 |
" |
|
493 |
STCKeepSTIntermediate := true. |
|
494 |
STCKeepSTIntermediate := false. |
|
495 |
" |
|
2702 | 496 |
|
497 |
"Modified: / 16-09-2011 / 19:57:17 / cg" |
|
1658 | 498 |
! |
499 |
||
4089 | 500 |
stcKeepSTIntermediate:aBoolean |
501 |
STCKeepSTIntermediate := aBoolean. |
|
1940 | 502 |
|
503 |
" |
|
504 |
STCKeepSTIntermediate := true. |
|
505 |
STCKeepSTIntermediate := false. |
|
506 |
" |
|
507 |
||
508 |
"Modified: / 07-11-2006 / 10:58:54 / cg" |
|
1658 | 509 |
! |
510 |
||
511 |
stcModulePath |
|
4012 | 512 |
"the folder, where temporarily compiled modules are created by stc. |
513 |
Used to be inside the bin-directory, but that did not work for readonly/shared |
|
514 |
st/x installations (i.e. running stx from a mounted dbg). |
|
515 |
Therefore, this is now in the workspace (where the snapshot image resudes as well) |
|
516 |
||
517 |
Notice: |
|
518 |
this ought to be a persistent folder (at least as along as any |
|
519 |
snapshot image is present, which refers to any module there. |
|
520 |
As we cannot (currently) scan snapshots, this is somewhat tricky." |
|
521 |
||
522 |
STCModulePath notNil ifTrue:[^ STCModulePath]. |
|
523 |
^ UserPreferences current workspaceDirectory / 'modules' |
|
1658 | 524 |
! |
525 |
||
4089 | 526 |
stcModulePath:aPath |
4013 | 527 |
"set the path to the directory, where temporary modules are created. |
528 |
Obsolete now, as this should not be set from the outside, |
|
529 |
but instead rely totally on the userPreferences." |
|
530 |
||
4089 | 531 |
STCModulePath := aPath. |
1658 | 532 |
! |
533 |
||
534 |
stcPath |
|
535 |
^ STCPath |
|
536 |
! |
|
537 |
||
4017 | 538 |
stcPath:aPath |
539 |
STCPath := aPath |
|
1658 | 540 |
! |
541 |
||
2011 | 542 |
useBorlandC |
2803 | 543 |
"true if borland compiler should be used" |
544 |
||
2888 | 545 |
^ self usedCompilerDefine = DefineForBorlandC |
2011 | 546 |
|
547 |
"Created: / 15-03-2007 / 13:33:32 / cg" |
|
548 |
! |
|
549 |
||
3653 | 550 |
useClang |
551 |
"true if clang compiler should be used" |
|
552 |
||
553 |
^ self usedCompilerDefine = DefineForCLANG |
|
554 |
! |
|
555 |
||
2888 | 556 |
useCompilerDefine: aCompilerDefine |
2803 | 557 |
"enforce a particular compiler to be used (independent from |
558 |
what the system was compiled with)" |
|
559 |
||
560 |
ForcedCompiler := aCompilerDefine. |
|
561 |
||
2804 | 562 |
" |
563 |
self useCompiler: DefineForBorlandC |
|
564 |
self useCompiler: DefineForVisualC |
|
3719 | 565 |
self useCompiler: DefineForMINGW32 |
2804 | 566 |
" |
567 |
||
2888 | 568 |
"Created: / 20-07-2012 / 13:10:30 / cg" |
2803 | 569 |
! |
570 |
||
2011 | 571 |
useGnuC |
2803 | 572 |
"true if gnu-c compiler should be used" |
573 |
||
2888 | 574 |
^ self usedCompilerDefine = DefineForGNUC |
2011 | 575 |
|
576 |
"Created: / 15-03-2007 / 13:34:49 / cg" |
|
577 |
! |
|
578 |
||
3009
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
579 |
useMingw32 |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
580 |
"true if mingw compiler should be used" |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
581 |
|
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
582 |
^ self usedCompilerDefine = DefineForMINGW32 |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
583 |
! |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
584 |
|
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
585 |
useMingw64 |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
586 |
"true if mingw compiler should be used" |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
587 |
|
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
588 |
^ self usedCompilerDefine = DefineForMINGW64 |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
589 |
! |
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
590 |
|
2645 | 591 |
useVisualC |
2803 | 592 |
"true if visual-c compiler should be used" |
593 |
||
2888 | 594 |
|def| |
595 |
||
596 |
^ (def := self usedCompilerDefine) = DefineForVisualC |
|
597 |
or:[ def = DefineForMSC ] |
|
2645 | 598 |
|
599 |
"Created: / 08-08-2011 / 22:50:25 / cg" |
|
600 |
! |
|
601 |
||
2803 | 602 |
usedCompiler |
2888 | 603 |
|dfn| |
604 |
||
605 |
dfn := self usedCompilerDefine. |
|
606 |
||
607 |
dfn = DefineForGNUC ifTrue:[ ^'gcc']. |
|
608 |
dfn = DefineForBorlandC ifTrue:[ ^'bcc']. |
|
609 |
dfn = DefineForMSC ifTrue:[ ^'vc']. |
|
610 |
dfn = DefineForVisualC ifTrue:[ ^'vc']. |
|
3160 | 611 |
dfn = DefineForMINGW64 ifTrue:[ ^'mingw']. |
612 |
dfn = DefineForMINGW32 ifTrue:[ ^'mingw']. |
|
613 |
dfn = DefineForMINGW ifTrue:[ ^'mingw']. |
|
2888 | 614 |
"/ dfn = DefineForLCC ifTrue:[ ^'lcc']. |
615 |
||
616 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
3396 | 617 |
^ 'bcc' |
2888 | 618 |
]. |
619 |
^ 'gcc' |
|
2803 | 620 |
|
2805 | 621 |
" |
622 |
self usedCompiler |
|
623 |
" |
|
624 |
||
2803 | 625 |
"Created: / 31-01-2012 / 12:05:30 / cg" |
626 |
! |
|
627 |
||
2888 | 628 |
usedCompilerDefine |
4017 | 629 |
"return the define to be used for the compiler toolchain. |
630 |
By default, the toolchain with which stx itself was compiled is used (getCCDefine); |
|
631 |
can be overwritten by setting ForcedCompiler" |
|
632 |
||
2888 | 633 |
|dfn| |
634 |
||
635 |
dfn := ForcedCompiler. |
|
4022 | 636 |
dfn isNil ifTrue:[ dfn := STCCompilerInterface getCCDefine]. |
2888 | 637 |
^ dfn |
638 |
||
4017 | 639 |
" |
640 |
ForcedCompiler := DefineForCLANG. |
|
641 |
self usedCompilerDefine. |
|
642 |
||
643 |
ForcedCompiler := nil. |
|
644 |
self usedCompilerDefine. |
|
645 |
" |
|
646 |
||
2888 | 647 |
"Created: / 20-07-2012 / 13:11:22 / cg" |
648 |
! |
|
649 |
||
2645 | 650 |
vcTop:aPath |
651 |
"windows only: define the visual-C top directory. |
|
652 |
must contain bin\cl.exe and include. |
|
653 |
Typically, something like 'C:\Program Files\Microsoft Visual Studio 10.0\VC'" |
|
654 |
||
655 |
VCTop := aPath |
|
656 |
||
657 |
"Created: / 08-08-2011 / 22:39:15 / cg" |
|
658 |
! |
|
659 |
||
1658 | 660 |
withSTCCompilation:howSymbol do:aBlock |
661 |
|prev| |
|
662 |
||
663 |
prev := self stcCompilation. |
|
664 |
self stcCompilation:howSymbol. |
|
665 |
aBlock ensure:[ self stcCompilation:prev ] |
|
666 |
! ! |
|
667 |
||
1634 | 668 |
!ParserFlags class methodsFor:'accessing-syntax-control'! |
669 |
||
670 |
allowArrayIndexSyntaxExtension |
|
671 |
"experimental" |
|
672 |
||
673 |
^ AllowArrayIndexSyntaxExtension ? false |
|
3190 | 674 |
|
675 |
" |
|
676 |
self allowArrayIndexSyntaxExtension:true |
|
677 |
self allowArrayIndexSyntaxExtension:false |
|
678 |
self allowArrayIndexSyntaxExtension |
|
679 |
" |
|
1634 | 680 |
! |
681 |
||
682 |
allowArrayIndexSyntaxExtension:aBoolean |
|
683 |
"experimental" |
|
684 |
||
685 |
AllowArrayIndexSyntaxExtension := aBoolean. |
|
686 |
||
687 |
" |
|
688 |
self allowArrayIndexSyntaxExtension:true |
|
689 |
self allowArrayIndexSyntaxExtension:false |
|
690 |
" |
|
691 |
! |
|
692 |
||
2685 | 693 |
allowAssignmentToBlockArgument |
694 |
^ AllowAssignmentToBlockArgument |
|
695 |
||
696 |
"Created: / 08-09-2011 / 14:49:46 / cg" |
|
697 |
! |
|
698 |
||
699 |
allowAssignmentToBlockArgument:aBoolean |
|
700 |
AllowAssignmentToBlockArgument := aBoolean |
|
701 |
||
702 |
"Created: / 08-09-2011 / 14:50:23 / cg" |
|
703 |
! |
|
704 |
||
705 |
allowAssignmentToMethodArgument |
|
706 |
^ AllowAssignmentToMethodArgument |
|
707 |
||
708 |
"Created: / 08-09-2011 / 14:49:57 / cg" |
|
709 |
! |
|
710 |
||
711 |
allowAssignmentToMethodArgument:aBoolean |
|
712 |
AllowAssignmentToMethodArgument := aBoolean |
|
713 |
||
714 |
"Created: / 08-09-2011 / 14:50:34 / cg" |
|
715 |
! |
|
716 |
||
717 |
allowAssignmentToPoolVariable |
|
718 |
^ AllowAssignmentToPoolVariable |
|
719 |
||
720 |
"Created: / 08-09-2011 / 14:50:06 / cg" |
|
721 |
! |
|
722 |
||
723 |
allowAssignmentToPoolVariable:aBoolean |
|
724 |
AllowAssignmentToPoolVariable := aBoolean |
|
725 |
||
726 |
"Created: / 08-09-2011 / 14:50:48 / cg" |
|
727 |
! |
|
728 |
||
1634 | 729 |
allowDollarInIdentifier |
730 |
"return true, if $-characters are allowed in identifiers. |
|
4041 | 731 |
Notice, that dollars are NEVER allowed as the first character in an identifier |
732 |
(because they are interpreted as character-constant then)." |
|
1634 | 733 |
|
734 |
^ AllowDollarInIdentifier |
|
735 |
||
4041 | 736 |
"Created: / 07-09-1997 / 01:32:18 / cg" |
737 |
"Modified (comment): / 16-11-2016 / 22:25:59 / cg" |
|
1634 | 738 |
! |
739 |
||
740 |
allowDollarInIdentifier:aBoolean |
|
741 |
"this allows turning on/off $-characters in identifiers. |
|
742 |
Notice, that dollars are NEVER allowed as the first character in an identifier. |
|
743 |
If turned off (the default), dollars are not allowed in identifiers, |
|
744 |
but instead are scanned as character-constant prefix. |
|
4041 | 745 |
If turned on, dollars in identifiers are allowed, while extra |
1634 | 746 |
dollars are still scanned as constant character prefix. |
747 |
If you have to fileIn old VW-Vsn2.x classes, turn this off |
|
748 |
before filing them in; i.e.: |
|
4041 | 749 |
Compiler allowDollarInIdentifiers:false |
750 |
" |
|
1634 | 751 |
|
752 |
AllowDollarInIdentifier := aBoolean. |
|
753 |
||
4041 | 754 |
"Created: / 07-09-1997 / 01:34:49 / cg" |
755 |
"Modified (comment): / 16-11-2016 / 22:26:38 / cg" |
|
1634 | 756 |
! |
757 |
||
758 |
allowDolphinExtensions |
|
759 |
"return true, if ##(..) computed literals are allowed" |
|
760 |
||
761 |
^ AllowDolphinExtensions |
|
762 |
! |
|
763 |
||
764 |
allowDolphinExtensions:aBoolean |
|
765 |
"this allows turning on/off support for computed arrays ##(..) as in dolphin. |
|
766 |
If you want to fileIn Dolphin classes, enable this with: |
|
3396 | 767 |
Compiler allowDolphinComputedArrays:true" |
1634 | 768 |
|
769 |
AllowDolphinExtensions := aBoolean. |
|
770 |
||
771 |
" |
|
772 |
self allowDolphinExtensions:true |
|
773 |
self allowDolphinExtensions:false |
|
774 |
" |
|
775 |
! |
|
776 |
||
1950 | 777 |
allowEmptyStatements |
778 |
"return true, if empty statements are allowed (two .'s in a row). |
|
779 |
Notice, that stc cannot (yet) handle those." |
|
780 |
||
781 |
^ AllowEmptyStatements |
|
782 |
||
783 |
"Created: / 20-11-2006 / 14:29:02 / cg" |
|
784 |
! |
|
785 |
||
786 |
allowEmptyStatements:aBoolean |
|
787 |
"turn on/off, if empty statements are allowed (two .'s in a row). |
|
788 |
Notice, that stc cannot (yet) handle those." |
|
789 |
||
790 |
AllowEmptyStatements := aBoolean |
|
791 |
||
792 |
"Created: / 20-11-2006 / 14:29:15 / cg" |
|
793 |
! |
|
794 |
||
2145 | 795 |
allowExtendedBinarySelectors |
796 |
"experimental extended selectors extensions" |
|
797 |
||
798 |
^ AllowExtendedBinarySelectors |
|
2218
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
799 |
|
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
800 |
" |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
801 |
ParserFlags allowExtendedBinarySelectors |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
802 |
ParserFlags allowExtendedBinarySelectors:false |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
803 |
ParserFlags allowExtendedBinarySelectors:true |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
804 |
" |
2145 | 805 |
! |
806 |
||
807 |
allowExtendedBinarySelectors:aBoolean |
|
808 |
"experimental syntay extensions" |
|
809 |
||
810 |
AllowExtendedBinarySelectors := aBoolean |
|
811 |
! |
|
812 |
||
1682 | 813 |
allowExtendedSTXSyntax |
814 |
"experimental syntay extensions" |
|
815 |
||
816 |
^ AllowExtendedSTXSyntax |
|
817 |
! |
|
818 |
||
819 |
allowExtendedSTXSyntax:aBoolean |
|
820 |
"experimental syntay extensions" |
|
821 |
||
822 |
AllowExtendedSTXSyntax := aBoolean |
|
823 |
||
824 |
" |
|
825 |
self allowExtendedSTXSyntax:true |
|
826 |
'a\tb' inspect. |
|
827 |
'a\u1616b' inspect. |
|
3396 | 828 |
self allowExtendedSTXSyntax:false |
1682 | 829 |
" |
830 |
! |
|
831 |
||
1677 | 832 |
allowFixedPointLiterals |
833 |
"return true, if nnnsn (FixedPoint) literals are allowed" |
|
834 |
||
835 |
^ AllowFixedPointLiterals |
|
836 |
! |
|
837 |
||
838 |
allowFixedPointLiterals:aBoolean |
|
839 |
"enable/disable, if nnnsn (FixedPoint) literals are allowed" |
|
840 |
||
841 |
AllowFixedPointLiterals := aBoolean |
|
842 |
! |
|
843 |
||
1634 | 844 |
allowFunctionCallSyntaxForBlockEvaluation |
845 |
"experimental" |
|
846 |
||
847 |
^ AllowFunctionCallSyntaxForBlockEvaluation |
|
1721 | 848 |
|
849 |
" |
|
850 |
AllowFunctionCallSyntaxForBlockEvaluation := true |
|
851 |
" |
|
1634 | 852 |
! |
853 |
||
854 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean |
|
855 |
"experimental" |
|
856 |
||
857 |
AllowFunctionCallSyntaxForBlockEvaluation := aBoolean. |
|
858 |
! |
|
859 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
860 |
allowHashAsBinarySelector |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
861 |
^ AllowHashAsBinarySelector |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
862 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
863 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
864 |
allowHashAsBinarySelector:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
865 |
AllowHashAsBinarySelector := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
866 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
867 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
868 |
self allowHashAsBinarySelector:true |
3396 | 869 |
self allowHashAsBinarySelector:false |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
870 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
871 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
872 |
|
4185 | 873 |
allowJavaScriptConst |
874 |
"return true, if const is allowed and treated as a keyword (in JavaScript)" |
|
875 |
||
876 |
^ AllowJavaScriptConst |
|
877 |
||
878 |
"Created: / 08-08-2017 / 23:48:48 / cg" |
|
879 |
! |
|
880 |
||
881 |
allowJavaScriptConst:aBoolean |
|
882 |
"true, if const is allowed and treated as a keyword (in JavaScript)" |
|
883 |
||
884 |
AllowJavaScriptConst := aBoolean |
|
885 |
||
886 |
"Created: / 08-08-2017 / 23:49:07 / cg" |
|
887 |
! |
|
888 |
||
4238 | 889 |
allowJavaScriptLet |
890 |
"return true, if let is allowed and treated as a keyword (in JavaScript)" |
|
891 |
||
892 |
^ AllowJavaScriptLet |
|
893 |
||
894 |
"Created: / 08-08-2017 / 23:48:48 / cg" |
|
895 |
! |
|
896 |
||
1634 | 897 |
allowLiteralNameSpaceSymbols |
898 |
"return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
|
899 |
||
900 |
^ AllowLiteralNameSpaceSymbols |
|
901 |
! |
|
902 |
||
903 |
allowLiteralNameSpaceSymbols:aBoolean |
|
904 |
"controls, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
|
905 |
||
906 |
AllowLiteralNameSpaceSymbols := aBoolean |
|
907 |
! |
|
908 |
||
909 |
allowLocalVariableDeclarationWithInitializerExpression |
|
910 |
"experimental" |
|
911 |
||
912 |
^ AllowLocalVariableDeclarationWithInitializerExpression |
|
913 |
! |
|
914 |
||
915 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean |
|
916 |
"experimental" |
|
917 |
||
918 |
AllowLocalVariableDeclarationWithInitializerExpression := aBoolean. |
|
919 |
! |
|
920 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
921 |
allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
922 |
"return true, if national characters (diaresis etc.) are allowed in identifiers" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
923 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
924 |
^ AllowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
925 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
926 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
927 |
allowNationalCharactersInIdentifier:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
928 |
"this allows turning on/off recognition of national characters (diaresis etc.) in identifiers. |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
929 |
Use this ONLY to file in some non-ANSI ST/V code" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
930 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
931 |
AllowNationalCharactersInIdentifier := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
932 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
933 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
934 |
ParserFlags allowNationalCharactersInIdentifier:true |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
935 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
936 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
937 |
|
1634 | 938 |
allowOldStyleAssignment |
939 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed" |
|
940 |
||
941 |
^ AllowOldStyleAssignment |
|
942 |
! |
|
943 |
||
944 |
allowOldStyleAssignment:aBoolean |
|
945 |
"this allows turning on/off recognition of underscore-assignment (pre ST-80v4 syntax). |
|
946 |
You must turn this off, if code with variables named '_' is to be filedIn" |
|
947 |
||
948 |
AllowOldStyleAssignment := aBoolean |
|
949 |
! |
|
950 |
||
4041 | 951 |
allowParagraphInIdentifier |
4238 | 952 |
"return true, if §-characters are allowed in identifiers (treated as letter)" |
4041 | 953 |
|
954 |
^ AllowParagraphInIdentifier |
|
955 |
||
956 |
"Created: / 16-11-2016 / 22:24:32 / cg" |
|
957 |
! |
|
958 |
||
959 |
allowParagraphInIdentifier:aBoolean |
|
4238 | 960 |
"this allows turning on/off §-characters in identifiers." |
4041 | 961 |
|
962 |
AllowParagraphInIdentifier := aBoolean. |
|
963 |
||
964 |
"Created: / 16-11-2016 / 22:28:49 / cg" |
|
965 |
! |
|
966 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
967 |
allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
968 |
"return true, if periods are allowed in a symbol literal #foo.bar. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
969 |
Needed to parse some old ST80/Squeak code" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
970 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
971 |
^ AllowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
972 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
973 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
974 |
allowPeriodInSymbol:aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
975 |
"control, if periods are allowed in a symbol literal #foo.bar. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
976 |
Needed to parse some old ST80/Squeak code" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
977 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
978 |
AllowPeriodInSymbol := aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
979 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
980 |
" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
981 |
self allowPeriodInSymbol:true. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
982 |
self assert:( Parser parseExpression:' #foo.bar.baz. ' ) value == #'foo.bar.baz'. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
983 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
984 |
self allowPeriodInSymbol:false. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
985 |
self assert:( Parser parseExpression:' #foo.bar.baz. ' ) value == #'foo'. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
986 |
" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
987 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
988 |
|
3576 | 989 |
allowQualifiedNames |
990 |
"return true, if #{..} qualified names are allowed" |
|
991 |
||
992 |
^ AllowQualifiedNames |
|
993 |
! |
|
994 |
||
995 |
allowQualifiedNames:aBoolean |
|
996 |
"this allows turning on/off support for qualifiedNames #{ .., } as in vw3. |
|
997 |
If you want to fileIn vw3 or later classes, enable this with: |
|
998 |
Compiler allowQualifiedNames:true |
|
999 |
Notice, that qualified names are not really supported semantically |
|
1000 |
(they are parsed, but treated like regular globals) |
|
1001 |
" |
|
1002 |
||
1003 |
AllowQualifiedNames := aBoolean. |
|
1004 |
||
1005 |
" |
|
1006 |
self allowQualifiedNames:true |
|
1007 |
self allowQualifiedNames:false |
|
1008 |
" |
|
1009 |
! |
|
1634 | 1010 |
|
1011 |
allowReservedWordsAsSelectors |
|
1012 |
"return true, if self, super, thisContext, nil, true and false are to be allowed |
|
1013 |
as unary message selectors." |
|
1014 |
||
1015 |
^ AllowReservedWordsAsSelectors ? false |
|
1016 |
! |
|
1017 |
||
1018 |
allowReservedWordsAsSelectors:aBoolean |
|
1019 |
"enable/disable, if self, super, thisContext, nil, true and false are to be allowed |
|
1020 |
as unary message selectors." |
|
1021 |
||
1022 |
AllowReservedWordsAsSelectors := aBoolean. |
|
1023 |
||
1024 |
" |
|
1025 |
self allowReservedWordsAsSelectors:true |
|
1026 |
self allowReservedWordsAsSelectors:false |
|
1027 |
" |
|
1028 |
! |
|
1029 |
||
1702 | 1030 |
allowSTVExtensions |
1031 |
"return true, if support for ST/V syntax extensions is enabled." |
|
1032 |
||
1033 |
^ AllowSTVExtensions |
|
1034 |
! |
|
1035 |
||
1036 |
allowSTVExtensions:aBoolean |
|
1037 |
"this allows turning on/off support for ST/V extensions: |
|
1038 |
If you want to fileIn ST/V classes, enable this with: |
|
3396 | 1039 |
Compiler allowSTVComputedArrays:true" |
1702 | 1040 |
|
1041 |
AllowSTVExtensions := aBoolean. |
|
1042 |
||
1043 |
" |
|
1704 | 1044 |
ParserFlags allowSTVExtensions:true |
1045 |
ParserFlags allowSTVExtensions:false |
|
1702 | 1046 |
" |
1047 |
! |
|
1048 |
||
1700 | 1049 |
allowSTVPrimitives |
1050 |
"return true, if support for ST/V primitives is enabled." |
|
1051 |
||
1052 |
^ AllowSTVPrimitives |
|
1053 |
! |
|
1054 |
||
1055 |
allowSTVPrimitives:aBoolean |
|
1056 |
"this allows turning on/off support for ST/V primitives" |
|
1057 |
||
1058 |
AllowSTVPrimitives := aBoolean |
|
1704 | 1059 |
|
1060 |
" |
|
1061 |
ParserFlags allowSTVPrimitives:true |
|
1062 |
" |
|
1700 | 1063 |
! |
1064 |
||
2984 | 1065 |
allowSTXDelimiterComments |
3455 | 1066 |
"token delimited comments; |
1067 |
these are multiline comments of the form: |
|
4174 | 1068 |
''>>TOKEN |
1069 |
... anything, including double quotes |
|
1070 |
TOKEN>>'' |
|
3455 | 1071 |
(the '' being a double quote in the above) |
1072 |
Such comments are especially useful to comment pieces of sample code, which may |
|
1073 |
contain another comment in it, but you don't want to make them all EOL comments |
|
1074 |
(which are an ST/X speciality also, by the way). |
|
1075 |
Be aware, that no other smalltalk supports this, so your code becomes harder to port, if you use it. |
|
1076 |
" |
|
1077 |
||
2984 | 1078 |
^ AllowSTXDelimiterComments |
4174 | 1079 |
|
1080 |
"Modified (comment): / 28-07-2017 / 10:32:54 / cg" |
|
2984 | 1081 |
! |
1082 |
||
1083 |
allowSTXDelimiterComments:aBoolean |
|
3455 | 1084 |
"enable token delimited comments; |
1085 |
these are multiline comments of the form: |
|
3519
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
1086 |
''>>TOKEN |
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
1087 |
... anything, including double quotes |
03679c227ade
use getEnv:'programFiles' instead of hardcoding c:\program files
Claus Gittinger <cg@exept.de>
parents:
3506
diff
changeset
|
1088 |
TOKEN>>'' |
3455 | 1089 |
(the '' being a double quote in the above) |
1090 |
Such comments are especially useful to comment pieces of sample code, which may |
|
1091 |
contain another comment in it, but you don't want to make them all EOL comments |
|
1092 |
(which are an ST/X speciality also, by the way). |
|
1093 |
Be aware, that no other smalltalk supports this, so your code becomes harder to port, if you use it. |
|
1094 |
" |
|
1095 |
||
2984 | 1096 |
AllowSTXDelimiterComments := aBoolean. |
1097 |
||
1098 |
" |
|
1099 |
self allowSTXDelimiterComments:true |
|
1100 |
self allowSTXDelimiterComments:false |
|
1101 |
" |
|
1102 |
! |
|
1103 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1104 |
allowSTXEOLComments |
3946 | 1105 |
"are ST/X end-of-line comments allowed?" |
1106 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1107 |
^ AllowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1108 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1109 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1110 |
allowSTXEOLComments:aBoolean |
3946 | 1111 |
"are ST/X end-of-line comments allowed?" |
1112 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1113 |
AllowSTXEOLComments := aBoolean. |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1114 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1115 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1116 |
self allowSTXEOLComments:true |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1117 |
self allowSTXEOLComments:false |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1118 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1119 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1120 |
|
3945 | 1121 |
allowSTXExtendedArrayLiterals |
3946 | 1122 |
"are scheme-style typed literal arrays allowed?" |
1123 |
||
3945 | 1124 |
^ AllowSTXExtendedArrayLiterals ? false |
1125 |
! |
|
1126 |
||
1127 |
allowSTXExtendedArrayLiterals:aBoolean |
|
3946 | 1128 |
"are scheme-style typed literal arrays allowed?" |
1129 |
||
3945 | 1130 |
AllowSTXExtendedArrayLiterals := aBoolean. |
1131 |
||
1132 |
" |
|
1133 |
self allowSTXExtendedArrayLiterals:true |
|
1134 |
self allowSTXExtendedArrayLiterals:false |
|
1135 |
" |
|
1136 |
! |
|
1137 |
||
4085 | 1138 |
allowSignedByteArrayElements |
1139 |
"return true, if byteArray elements are allowed to be negative." |
|
1140 |
||
1141 |
^ AllowSignedByteArrayElements |
|
1142 |
! |
|
1143 |
||
1144 |
allowSignedByteArrayElements:aBoolean |
|
1145 |
"controls, if byteArray elements are allowed to be negative." |
|
1146 |
||
1147 |
AllowSignedByteArrayElements := aBoolean |
|
1148 |
! |
|
1149 |
||
3576 | 1150 |
allowSqueakExtensions |
1151 |
"return true, if support for squeak extensions |
|
1152 |
computed arrays { .., } |
|
1153 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
1154 |
is enabled." |
|
1155 |
||
1156 |
^ AllowSqueakExtensions |
|
1157 |
! |
|
1158 |
||
1159 |
allowSqueakExtensions:aBoolean |
|
1160 |
"this allows turning on/off support for squeak extensions: |
|
1161 |
computed arrays { .., } |
|
1162 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
1163 |
||
1164 |
If you want to fileIn Squeak classes, enable this with: |
|
1165 |
Compiler allowSqueakComputedArrays:true" |
|
1166 |
||
1167 |
AllowSqueakExtensions := aBoolean. |
|
1168 |
||
1169 |
" |
|
1170 |
self allowSqueakExtensions:true |
|
1171 |
self allowSqueakExtensions:false |
|
1172 |
" |
|
1173 |
! |
|
1634 | 1174 |
|
1689 | 1175 |
allowSqueakPrimitives |
1176 |
"return true, if support for squeak primitives is enabled." |
|
1177 |
||
1178 |
^ AllowSqueakPrimitives |
|
1179 |
! |
|
1180 |
||
1181 |
allowSqueakPrimitives:aBoolean |
|
1182 |
"this allows turning on/off support for squeak primitives" |
|
1183 |
||
1184 |
AllowSqueakPrimitives := aBoolean |
|
1185 |
! |
|
1186 |
||
4149 | 1187 |
allowSymbolsStartingWithDigit |
1188 |
"return true, if a symbol is allowed to start with a digit |
|
1189 |
i.e. as in #2D. |
|
1190 |
This seems to be ok in new Squeak/Pharo versions" |
|
1191 |
||
1192 |
^ AllowSymbolsStartingWithDigit |
|
1193 |
||
1194 |
"Created: / 18-06-2017 / 16:23:20 / cg" |
|
1195 |
! |
|
1196 |
||
1197 |
allowSymbolsStartingWithDigit:aBoolean |
|
1198 |
"controls if a symbol is allowed to start with a digit |
|
1199 |
i.e. as in #2D. |
|
1200 |
This seems to be ok in new Squeak/Pharo versions" |
|
1201 |
||
1202 |
AllowSymbolsStartingWithDigit := aBoolean |
|
1203 |
||
1204 |
"Created: / 18-06-2017 / 16:24:47 / cg" |
|
1205 |
! |
|
1206 |
||
1634 | 1207 |
allowUnderscoreInIdentifier |
1208 |
"return true, if underscores are allowed in identifiers" |
|
1209 |
||
1210 |
^ AllowUnderscoreInIdentifier |
|
1211 |
! |
|
1212 |
||
1213 |
allowUnderscoreInIdentifier:aBoolean |
|
1214 |
"this allows turning on/off underscores in identifiers. |
|
1215 |
If turned off (the default), underscores are not allowed in identifiers, |
|
1216 |
but instead scanned as assignment character (old ST/80 syntax). |
|
1217 |
If turned on, underscores are in identifiers are allowed, while extra |
|
1218 |
underscores are still scanned as assignment. |
|
3396 | 1219 |
If you have to fileIn old VW-Vsn2.x classes, |
1634 | 1220 |
turn them off with: |
3396 | 1221 |
Compiler allowUnderscoreInIdentifiers:false" |
1634 | 1222 |
|
1223 |
AllowUnderscoreInIdentifier := aBoolean. |
|
1224 |
||
1225 |
"Modified: 7.9.1997 / 01:35:19 / cg" |
|
1655 | 1226 |
! |
1227 |
||
2310 | 1228 |
allowUnicodeCharacters |
1229 |
^ AllowUnicodeCharacters |
|
1230 |
! |
|
1231 |
||
1232 |
allowUnicodeCharacters:aBoolean |
|
1233 |
AllowUnicodeCharacters := aBoolean. |
|
1234 |
! |
|
1235 |
||
2307 | 1236 |
allowUnicodeStrings |
1237 |
^ AllowUnicodeStrings |
|
1238 |
! |
|
1239 |
||
1240 |
allowUnicodeStrings:aBoolean |
|
1241 |
AllowUnicodeStrings := aBoolean. |
|
1242 |
! |
|
1243 |
||
1655 | 1244 |
allowVisualAgeESSymbolLiterals |
1245 |
"return true, if ##symbols are allowed (treated like symbols)" |
|
1246 |
||
1247 |
^ AllowVisualAgeESSymbolLiterals |
|
1248 |
! |
|
1249 |
||
1250 |
allowVisualAgeESSymbolLiterals:aBoolean |
|
1251 |
"if on, visualAge's ##symbols are allowed (treated like symbols)" |
|
1252 |
||
1253 |
AllowVisualAgeESSymbolLiterals := aBoolean. |
|
1689 | 1254 |
! |
1255 |
||
1256 |
allowVisualAgePrimitives |
|
1257 |
"return true, if support for V'Age primitives is enabled." |
|
1258 |
||
3396 | 1259 |
^ AllowVisualAgePrimitives |
2747 | 1260 |
|
1261 |
" |
|
1262 |
AllowVisualAgePrimitives := true |
|
1263 |
AllowVisualAgePrimitives := false |
|
1264 |
" |
|
1265 |
||
1266 |
"Modified (comment): / 18-10-2011 / 16:49:12 / cg" |
|
1689 | 1267 |
! |
1268 |
||
1269 |
allowVisualAgePrimitives:aBoolean |
|
1270 |
"this allows turning on/off support for V'Age primitives" |
|
1271 |
||
1272 |
AllowVisualAgePrimitives := aBoolean |
|
1773 | 1273 |
! |
1274 |
||
1275 |
allowVisualWorksMethodAnnotations |
|
1276 |
"return true, if support for V'Works extended primitive syntax for method annotations." |
|
1277 |
||
1278 |
^ AllowVisualWorksMethodAnnotations |
|
1279 |
||
1280 |
"Created: / 07-07-2006 / 15:49:32 / cg" |
|
1281 |
! |
|
1282 |
||
1283 |
allowVisualWorksMethodAnnotations:aBoolean |
|
1284 |
"turn on/off support for V'Works extended primitive syntax for method annotations." |
|
1285 |
||
1286 |
AllowVisualWorksMethodAnnotations := aBoolean |
|
1287 |
||
1288 |
"Created: / 07-07-2006 / 15:49:27 / cg" |
|
3220 | 1289 |
! |
1290 |
||
1291 |
warnAssignmentToBlockArgument |
|
1292 |
^ WarnAssignmentToBlockArgument |
|
1293 |
! |
|
1294 |
||
1295 |
warnAssignmentToBlockArgument:aBoolean |
|
1296 |
WarnAssignmentToBlockArgument := aBoolean |
|
1297 |
! |
|
1298 |
||
1299 |
warnAssignmentToMethodArgument |
|
1300 |
^ WarnAssignmentToMethodArgument |
|
1301 |
! |
|
1302 |
||
1303 |
warnAssignmentToMethodArgument:aBoolean |
|
1304 |
WarnAssignmentToMethodArgument := aBoolean |
|
1305 |
! |
|
1306 |
||
1307 |
warnAssignmentToPoolVariable |
|
1308 |
^ WarnAssignmentToPoolVariable |
|
1309 |
! |
|
1310 |
||
1311 |
warnAssignmentToPoolVariable:aBoolean |
|
1312 |
WarnAssignmentToPoolVariable := aBoolean |
|
1634 | 1313 |
! ! |
1314 |
||
1315 |
!ParserFlags class methodsFor:'accessing-warning-control'! |
|
1316 |
||
1652 | 1317 |
warnAboutBadComments |
1318 |
"controls generation of warning messages about empty comments" |
|
3396 | 1319 |
|
1652 | 1320 |
^ WarnAboutBadComments |
1321 |
! |
|
1322 |
||
1323 |
warnAboutBadComments:aBoolean |
|
1324 |
"controls generation of warning messages about empty comments" |
|
3396 | 1325 |
|
1652 | 1326 |
WarnAboutBadComments := aBoolean |
1327 |
! |
|
1328 |
||
1811 | 1329 |
warnAboutNonLowercaseLocalVariableNames |
1740 | 1330 |
"controls generation of warning messages about wrong variable names" |
3396 | 1331 |
|
1811 | 1332 |
^ WarnAboutNonLowercaseLocalVariableNames |
1740 | 1333 |
! |
1334 |
||
3396 | 1335 |
warnAboutNonLowercaseLocalVariableNames:aBoolean |
1740 | 1336 |
"controls generation of warning messages about wrong variable names" |
3396 | 1337 |
|
1811 | 1338 |
WarnAboutNonLowercaseLocalVariableNames := aBoolean |
1740 | 1339 |
! |
1340 |
||
3396 | 1341 |
warnAboutPeriodInSymbol |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1342 |
^ WarnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1343 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1344 |
|
3396 | 1345 |
warnAboutPeriodInSymbol:aBoolean |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1346 |
WarnAboutPeriodInSymbol := aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1347 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1348 |
|
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1349 |
warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1350 |
^ WarnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1351 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1352 |
"Created: / 16-11-2006 / 14:31:52 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1353 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1354 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1355 |
warnAboutPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1356 |
WarnAboutPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1357 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1358 |
"Created: / 16-11-2006 / 14:31:57 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1359 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1360 |
|
2121 | 1361 |
warnAboutPossiblyUnimplementedSelectors |
1362 |
^ WarnAboutPossiblyUnimplementedSelectors |
|
1363 |
! |
|
1364 |
||
1365 |
warnAboutPossiblyUnimplementedSelectors:aBoolean |
|
1366 |
WarnAboutPossiblyUnimplementedSelectors := aBoolean |
|
1367 |
! |
|
1368 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1369 |
warnAboutReferenceToPrivateClass |
3396 | 1370 |
"controls generation of warning messages when a private class is referenced" |
1371 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1372 |
^ WarnAboutReferenceToPrivateClass |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1373 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1374 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1375 |
warnAboutReferenceToPrivateClass:aBoolean |
3396 | 1376 |
"controls generation of warning messages when a private class is referenced" |
1377 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1378 |
WarnAboutReferenceToPrivateClass := aBoolean |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1379 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1380 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1381 |
warnAboutShortLocalVariableNames |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1382 |
"controls generation of warning messages about short variable names" |
3396 | 1383 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1384 |
^ WarnAboutShortLocalVariableNames |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1385 |
! |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1386 |
|
3396 | 1387 |
warnAboutShortLocalVariableNames:aBoolean |
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1388 |
"controls generation of warning messages about short variable names" |
3396 | 1389 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1390 |
WarnAboutShortLocalVariableNames := aBoolean |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1391 |
! |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1392 |
|
2739 | 1393 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1394 |
"things like '\c:foo' instead of '\\c:foo' " |
|
3396 | 1395 |
|
2739 | 1396 |
^ WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1397 |
||
1398 |
"Created: / 04-10-2011 / 19:54:57 / cg" |
|
1399 |
! |
|
1400 |
||
1401 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean |
|
1402 |
"things like '\c:foo' instead of '\\c:foo' " |
|
3396 | 1403 |
|
2739 | 1404 |
WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean |
1405 |
||
1406 |
"Created: / 04-10-2011 / 19:54:42 / cg" |
|
1407 |
! |
|
1408 |
||
3396 | 1409 |
warnAboutVariableNameConventions |
1634 | 1410 |
"controls generation of warning messages about wrong variable names" |
3396 | 1411 |
|
1634 | 1412 |
^ WarnAboutVariableNameConventions |
1413 |
! |
|
1414 |
||
3396 | 1415 |
warnAboutVariableNameConventions:aBoolean |
1634 | 1416 |
"controls generation of warning messages about wrong variable names" |
3396 | 1417 |
|
1634 | 1418 |
WarnAboutVariableNameConventions := aBoolean |
1419 |
! |
|
1420 |
||
1421 |
warnAboutWrongVariableNames |
|
1422 |
"controls generation of warning messages about wrong variable names" |
|
3396 | 1423 |
|
1634 | 1424 |
^ WarnAboutWrongVariableNames |
1425 |
! |
|
1426 |
||
1427 |
warnAboutWrongVariableNames:aBoolean |
|
1428 |
"controls generation of warning messages about wrong variable names" |
|
3396 | 1429 |
|
1634 | 1430 |
WarnAboutWrongVariableNames := aBoolean |
1431 |
! |
|
1432 |
||
1433 |
warnCommonMistakes |
|
1434 |
"return true, if common beginners mistakes are to be warned about" |
|
1435 |
||
1754 | 1436 |
^ WarnCommonMistakes |
1634 | 1437 |
! |
1438 |
||
1439 |
warnCommonMistakes:aBoolean |
|
1440 |
"this allows turning on/off warnings about common beginners mistakes. |
|
1441 |
Those are not really errors in the strict sense, but often lead to |
|
1442 |
run time errors later. |
|
1443 |
Examples are: expr or:expr2, where expr2 is not a block. |
|
1444 |
If you get bored by those warnings, turn them off by adding |
|
1445 |
a line as: |
|
3396 | 1446 |
ParserFlags warnCommonMistakes:false |
1634 | 1447 |
in your 'private.rc' file" |
1448 |
||
1449 |
WarnCommonMistakes := aBoolean |
|
1902 | 1450 |
|
1451 |
"Modified: / 05-09-2006 / 11:46:26 / cg" |
|
1634 | 1452 |
! |
1453 |
||
1454 |
warnDollarInIdentifier |
|
1455 |
"return true, if $-characters in identifiers are to be warned about" |
|
1456 |
||
1457 |
^ Warnings and:[WarnDollarInIdentifier] |
|
1458 |
||
1459 |
"Created: 7.9.1997 / 01:36:17 / cg" |
|
1460 |
! |
|
1461 |
||
1462 |
warnDollarInIdentifier:aBoolean |
|
1463 |
"this allows turning on/off warnings about $-characters in identifiers. |
|
1464 |
You may find those warnings useful, to make certain that your code |
|
4041 | 1465 |
is portable to other Smalltalk versions, which do not allow this |
1634 | 1466 |
(i.e. VW releases 2.x and maybe others). |
1467 |
Notice, that dollars are NEVER allowed as the first character in an identifier. |
|
1468 |
If you get bored by those warnings, turn them off by adding |
|
1469 |
a line as: |
|
4041 | 1470 |
ParserFlags warnDollarInIdentifier:false |
1634 | 1471 |
in your 'private.rc' file" |
1472 |
||
1473 |
WarnDollarInIdentifier := aBoolean |
|
1474 |
||
1902 | 1475 |
"Created: / 07-09-1997 / 01:37:42 / cg" |
1476 |
"Modified: / 05-09-2006 / 11:46:23 / cg" |
|
4041 | 1477 |
"Modified (comment): / 16-11-2016 / 22:31:06 / cg" |
1634 | 1478 |
! |
1479 |
||
1682 | 1480 |
warnHiddenVariables |
1481 |
"controls generation of warning messages about hiding variables by locals" |
|
3396 | 1482 |
|
1682 | 1483 |
^ WarnHiddenVariables |
1484 |
! |
|
1485 |
||
1486 |
warnHiddenVariables:aBoolean |
|
1487 |
"controls generation of warning messages about hiding variables by locals" |
|
1488 |
||
1489 |
WarnHiddenVariables := aBoolean |
|
1490 |
! |
|
1491 |
||
1492 |
warnInconsistentReturnValues |
|
1493 |
"return true, if compiler should warn about inconsitent (boolean / non-boolean) |
|
1494 |
return values" |
|
1495 |
||
1496 |
^ WarnInconsistentReturnValues |
|
1497 |
! |
|
1498 |
||
1499 |
warnInconsistentReturnValues:aBoolean |
|
1500 |
"constrols if the compiler should warn about inconsitent (boolean / non-boolean) |
|
1501 |
return values" |
|
1502 |
||
1503 |
WarnInconsistentReturnValues := aBoolean |
|
1504 |
! |
|
1505 |
||
1634 | 1506 |
warnOldStyleAssignment |
1507 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be warned about" |
|
1508 |
||
1509 |
^ Warnings and:[WarnOldStyleAssignment] |
|
1510 |
! |
|
1511 |
||
1512 |
warnOldStyleAssignment:aBoolean |
|
1513 |
"this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax). |
|
1514 |
If you get bored by those warnings, turn them off by adding |
|
1515 |
a line as: |
|
3396 | 1516 |
ParserFlags warnOldStyleAssignment:false |
1634 | 1517 |
in your 'private.rc' file" |
1518 |
||
1519 |
WarnOldStyleAssignment := aBoolean |
|
1902 | 1520 |
|
1521 |
"Modified: / 05-09-2006 / 11:46:17 / cg" |
|
1634 | 1522 |
! |
1523 |
||
4041 | 1524 |
warnParagraphInIdentifier |
4238 | 1525 |
"return true, if §-characters in identifiers are to be warned about" |
4041 | 1526 |
|
1527 |
^ Warnings and:[WarnParagraphInIdentifier] |
|
1528 |
||
1529 |
"Created: / 16-11-2016 / 22:30:01 / cg" |
|
1530 |
! |
|
1531 |
||
1532 |
warnParagraphInIdentifier:aBoolean |
|
4238 | 1533 |
"this allows turning on/off warnings about §-characters in identifiers. |
4041 | 1534 |
You may find those warnings useful, to make certain that your code |
1535 |
is portable to other Smalltalk versions, which do not allow this" |
|
1536 |
||
1537 |
WarnParagraphInIdentifier := aBoolean |
|
1538 |
||
1539 |
"Created: / 16-11-2016 / 22:30:45 / cg" |
|
1540 |
! |
|
1541 |
||
2787 | 1542 |
warnPlausibilityChecks |
1543 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
1544 |
||
1545 |
^ WarnPlausibilityChecks |
|
1546 |
||
1547 |
"Created: / 19-01-2012 / 10:38:20 / cg" |
|
1548 |
! |
|
1549 |
||
1550 |
warnPlausibilityChecks:aBoolean |
|
1551 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
1552 |
||
1553 |
WarnPlausibilityChecks := aBoolean |
|
1554 |
||
1555 |
"Created: / 19-01-2012 / 10:38:39 / cg" |
|
1556 |
! |
|
1557 |
||
1634 | 1558 |
warnPossibleIncompatibilities |
1559 |
"return true, if possible incompatibilities (with other ST systems) |
|
1560 |
are to be warned about" |
|
1561 |
||
1562 |
^ Warnings and:[WarnPossibleIncompatibilities] |
|
1563 |
||
1564 |
"Modified: 23.5.1997 / 12:02:02 / cg" |
|
1565 |
! |
|
1566 |
||
1567 |
warnPossibleIncompatibilities:aBoolean |
|
1568 |
"this turns warnings about possible incompatibilities (with other ST systems) |
|
1569 |
on or off. |
|
1570 |
If you get bored by those warnings, turn them off by adding |
|
1571 |
a line as: |
|
3396 | 1572 |
ParserFlags warnPossibleIncompatibilities:false |
1634 | 1573 |
in your 'private.rc' file." |
1574 |
||
1575 |
WarnPossibleIncompatibilities := aBoolean |
|
1576 |
||
1902 | 1577 |
"Created: / 23-05-1997 / 12:02:45 / cg" |
1578 |
"Modified: / 05-09-2006 / 11:46:14 / cg" |
|
1634 | 1579 |
! |
1580 |
||
1581 |
warnSTXSpecials |
|
1582 |
"return true, if ST/X specials are to be warned about" |
|
1583 |
||
1584 |
^ Warnings and:[WarnSTXSpecials] |
|
1585 |
! |
|
1586 |
||
1587 |
warnSTXSpecials:aBoolean |
|
1588 |
"this allows turning on/off warnings about stx specials. |
|
1589 |
If you get bored by those warnings, turn them off by adding |
|
1590 |
a line as: |
|
3396 | 1591 |
ParserFlags warnSTXSpecials:false |
1634 | 1592 |
in your 'private.rc' file" |
1593 |
||
1594 |
WarnSTXSpecials := aBoolean |
|
1902 | 1595 |
|
1596 |
"Modified: / 05-09-2006 / 11:46:11 / cg" |
|
1634 | 1597 |
! |
1598 |
||
1599 |
warnUnderscoreInIdentifier |
|
1600 |
"return true, if underscores in identifiers are to be warned about" |
|
1601 |
||
1602 |
^ Warnings and:[WarnUnderscoreInIdentifier] |
|
1603 |
! |
|
1604 |
||
1605 |
warnUnderscoreInIdentifier:aBoolean |
|
1606 |
"this allows turning on/off warnings about underscores in identifiers. |
|
1607 |
You may find those warnings useful, to make certain that your code |
|
1608 |
is portable to other smalltalk versions, which do not allow this |
|
1609 |
(i.e. VW releases 2.x). |
|
1610 |
If you get bored by those warnings, turn them off by adding |
|
1611 |
a line as: |
|
3396 | 1612 |
ParserFlags warnUnderscoreInIdentifier:false |
1634 | 1613 |
in your 'private.rc' file" |
1614 |
||
1615 |
WarnUnderscoreInIdentifier := aBoolean |
|
1616 |
||
1902 | 1617 |
"Modified: / 05-09-2006 / 11:46:08 / cg" |
1634 | 1618 |
! |
1619 |
||
1620 |
warnUnusedVars |
|
1621 |
"controls generation of warning messages about unued method variables" |
|
1622 |
||
1623 |
^ WarnUnusedVars |
|
1624 |
! |
|
1625 |
||
1626 |
warnUnusedVars:aBoolean |
|
1627 |
"controls generation of warning messages about unued method variables" |
|
1628 |
||
1629 |
WarnUnusedVars := aBoolean |
|
1630 |
! |
|
1631 |
||
1632 |
warnings |
|
1633 |
"return true, if any warnings are to be shown" |
|
1634 |
||
1635 |
^ Warnings |
|
1636 |
! |
|
1637 |
||
1638 |
warnings:aBoolean |
|
1639 |
"this allows turning on/off all warnings; the default is on. |
|
1640 |
You can turn off warnings in your 'private.rc' file with |
|
3396 | 1641 |
ParserFlags warnings:false |
1634 | 1642 |
" |
1643 |
||
1644 |
Warnings := aBoolean |
|
1645 |
||
1902 | 1646 |
" |
1647 |
ParserFlags warnings |
|
1648 |
ParserFlags warnings:true |
|
1649 |
ParserFlags warnings:false |
|
1650 |
" |
|
1651 |
||
1652 |
"Modified: / 05-09-2006 / 11:46:47 / cg" |
|
1634 | 1653 |
! ! |
1654 |
||
1655 |
!ParserFlags class methodsFor:'class initialization'! |
|
1656 |
||
3576 | 1657 |
initialize |
4017 | 1658 |
|executablePath topDir| |
3576 | 1659 |
|
1660 |
Warnings := true. |
|
1661 |
WarnUndeclared := true. |
|
1662 |
WarnUnusedVars := true. |
|
1663 |
WarnSTXSpecials := false. |
|
1664 |
WarnST80Directives := false. |
|
1665 |
WarnAboutWrongVariableNames := true. |
|
1666 |
WarnAboutVariableNameConventions := true. |
|
1667 |
WarnAboutBadComments := true. |
|
1668 |
WarnUnderscoreInIdentifier := false. |
|
1669 |
WarnDollarInIdentifier := true. |
|
4041 | 1670 |
WarnParagraphInIdentifier := true. |
3576 | 1671 |
WarnOldStyleAssignment := true. |
1672 |
WarnCommonMistakes := true. |
|
1673 |
WarnPossibleIncompatibilities := false. |
|
1674 |
WarnHiddenVariables := true. |
|
1675 |
WarnInconsistentReturnValues := true. |
|
1676 |
WarnAboutNonLowercaseLocalVariableNames := true. |
|
1677 |
WarnAboutShortLocalVariableNames := false. |
|
1678 |
WarnAboutPossibleSTCCompilationProblems := true. |
|
1679 |
WarnAboutReferenceToPrivateClass := true. |
|
1680 |
WarnAboutPossiblyUnimplementedSelectors := true. |
|
1681 |
WarnAboutPeriodInSymbol := true. |
|
1682 |
WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := false. |
|
1683 |
WarnPlausibilityChecks := true. |
|
1684 |
WarnAssignmentToBlockArgument := true. |
|
1685 |
WarnAssignmentToMethodArgument := true. |
|
1686 |
WarnAssignmentToPoolVariable := true. |
|
1687 |
||
1688 |
AllowReservedWordsAsSelectors := false. |
|
1689 |
AllowUnderscoreInIdentifier := true. |
|
4041 | 1690 |
AllowParagraphInIdentifier := false. |
3576 | 1691 |
AllowDollarInIdentifier := false. "/ st80-vms dollars in identifiers |
1692 |
AllowOldStyleAssignment := true. "/ st80 underscore as assignment |
|
1693 |
AllowDolphinExtensions := false. "/ dolphin computed literal |
|
1694 |
AllowQualifiedNames := false. "/ vw3 qualified names |
|
1695 |
AllowExtendedBinarySelectors := false. "/ vw5.4 extended binary selectors (plus/minus, center-dot etc.) |
|
1696 |
AllowCaretAsBinop := false. "/ too dangerous |
|
1697 |
AllowLiteralNameSpaceSymbols := true. "/ st/x literal nameSpace-symbols (#foo::bar) |
|
1698 |
AllowArrayIndexSyntaxExtension := false. |
|
1699 |
AllowFunctionCallSyntaxForBlockEvaluation := false. |
|
1700 |
AllowLocalVariableDeclarationWithInitializerExpression := false. |
|
1701 |
AllowDomainVariables := false. |
|
1702 |
AllowArrayIndexSyntaxExtension := false. |
|
1703 |
AllowReservedWordsAsSelectors := true. |
|
1704 |
AllowVariableReferences := false. |
|
1705 |
AllowLazyValueExtension := false. |
|
1706 |
AllowFixedPointLiterals := true "false". |
|
1707 |
AllowExtendedSTXSyntax := false. |
|
1708 |
AllowVisualAgeESSymbolLiterals := false. |
|
1709 |
AllowExtensionsToPrivateClasses := true. |
|
1710 |
AllowVisualAgePrimitives := false. |
|
1711 |
AllowSqueakExtensions := true. "/ squeak computed array |
|
1712 |
AllowSqueakPrimitives := false. |
|
1713 |
AllowSTVPrimitives := false. "/ number-sign syntax |
|
1714 |
AllowSTVExtensions := false. |
|
1715 |
AllowNationalCharactersInIdentifier := false. |
|
1716 |
AllowHashAsBinarySelector := true. |
|
1717 |
AllowSTXEOLComments := true. |
|
1718 |
AllowSTXDelimiterComments := true. "/ until stc and RBScanner support it also |
|
1719 |
AllowVisualWorksMethodAnnotations := false. |
|
1720 |
AllowPossibleSTCCompilationProblems := true. "/ must be true, to allow fileIn!! |
|
1721 |
AllowEmptyStatements := false. |
|
1722 |
AllowPeriodInSymbol := false. |
|
1723 |
"/ these are only used by the new compiler |
|
1724 |
AllowUnicodeStrings := false. |
|
1725 |
AllowUnicodeCharacters := false. |
|
1726 |
AllowCharacterEscapes := false. |
|
1727 |
AllowStringEscapes := false. |
|
1728 |
AllowAssignmentToBlockArgument := false. |
|
1729 |
AllowAssignmentToMethodArgument := false. |
|
1730 |
AllowAssignmentToPoolVariable := false. |
|
1731 |
"/ AllowAssignmentToPoolVariable := true. |
|
4085 | 1732 |
AllowSignedByteArrayElements := false. |
4149 | 1733 |
AllowSymbolsStartingWithDigit := false. |
4185 | 1734 |
|
1735 |
AllowJavaScriptConst := true. |
|
4238 | 1736 |
AllowJavaScriptLet := false. |
4149 | 1737 |
|
3576 | 1738 |
ArraysAreImmutable := false. "/ still care for ST-80 compatibility |
1739 |
StringsAreImmutable := false. "/ still care for ST-80 compatibility |
|
1740 |
"/ ArraysAreImmutable := true. "/ do not care for ST-80 compatibility |
|
1741 |
"/ StringsAreImmutable := true. "/ do not care for ST-80 compatibility |
|
1742 |
ImplicitSelfSends := false. |
|
4050 | 1743 |
|
3576 | 1744 |
STCKeepCIntermediate := false. |
1745 |
STCKeepOIntermediate := false. |
|
1746 |
STCKeepSTIntermediate := false. |
|
1747 |
STCCompilation := #default. |
|
1748 |
||
1749 |
DefineForBorlandC := '__BORLANDC__'. |
|
1750 |
DefineForVisualC := '__VISUALC__'. |
|
1751 |
DefineForMSC := '__MSC__'. |
|
1752 |
DefineForGNUC := '__GNUC__'. |
|
1753 |
DefineForMINGW := '__MINGW__'. |
|
1754 |
DefineForMINGW32 := '__MINGW32__'. |
|
1755 |
DefineForMINGW64 := '__MINGW64__'. |
|
3945 | 1756 |
DefineForCLANG := '__CLANG__'. |
3576 | 1757 |
|
4017 | 1758 |
"/ try along the executable's path itself |
3576 | 1759 |
(executablePath := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[ |
4017 | 1760 |
|parentDir| |
1761 |
||
1762 |
parentDir := executablePath asFilename directory. |
|
1763 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
1764 |
topDir := parentDir. |
|
1765 |
] ifFalse:[ |
|
1766 |
parentDir := parentDir directory. |
|
1767 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
1768 |
topDir := parentDir. |
|
1769 |
] ifFalse:[ |
|
1770 |
parentDir := parentDir directory. |
|
1771 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
1772 |
topDir := parentDir. |
|
1773 |
] |
|
1774 |
] |
|
1775 |
]. |
|
1776 |
]. |
|
1777 |
||
1778 |
topDir isNil ifTrue:[ |
|
4048 | 1779 |
"/ try standard installation paths... |
4017 | 1780 |
OperatingSystem isOSXlike ifTrue:[ |
1781 |
|appDir parentDir| |
|
1782 |
||
1783 |
(appDir := '/Applications/SmalltalkX.app' asFilename) exists ifTrue:[ |
|
1784 |
(parentDir := appDir / 'Packages/stx') exists ifTrue:[ |
|
1785 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
1786 |
topDir := parentDir. |
|
1787 |
]. |
|
1788 |
]. |
|
1789 |
]. |
|
1790 |
(appDir := Filename homeDirectory / 'Applications/SmalltalkX.app') exists ifTrue:[ |
|
1791 |
(parentDir := appDir / 'Packages/stx') exists ifTrue:[ |
|
1792 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
1793 |
topDir := parentDir. |
|
1794 |
]. |
|
1795 |
]. |
|
1796 |
]. |
|
1797 |
]. |
|
1798 |
]. |
|
1799 |
||
1800 |
topDir notNil ifTrue:[ |
|
1801 |
self initializeSTCFlagsForTopDirectory:topDir. |
|
3576 | 1802 |
]. |
1803 |
||
1804 |
" |
|
1805 |
ParserFlags initialize |
|
1806 |
" |
|
1807 |
||
1808 |
"Modified: / 09-08-2006 / 18:47:18 / fm" |
|
4185 | 1809 |
"Modified: / 08-08-2017 / 23:49:41 / cg" |
3576 | 1810 |
! |
1811 |
||
1812 |
initializeSTCFlagsForTopDirectory:topDirArg |
|
1813 |
"topDirArg must be the stx directory (where stc directory with stc-executable is found) |
|
1814 |
notice: for now, can only initialize for borland+windows or linux; |
|
1815 |
visualC setup still fails." |
|
1816 |
||
3719 | 1817 |
|topDir topDirName vcTop sdkTop bccTop mingwTop |
3945 | 1818 |
borlandDir useBorlandC useVisualC useMingw32 useMingw64 |
3719 | 1819 |
programFiles archArg picArg| |
3576 | 1820 |
|
1821 |
topDir := topDirArg. |
|
1822 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
3960 | 1823 |
topDirArg isString ifTrue:[ |
1824 |
topDir := topDirArg copyReplaceAll:$/ with:$\ ifNone:topDirArg. |
|
1825 |
] |
|
3576 | 1826 |
]. |
1827 |
topDir := topDir asFilename. |
|
1828 |
topDirName := topDir name. |
|
1829 |
||
1830 |
"/ if in the development directory, use ./modules |
|
1831 |
Smalltalk isSmalltalkDevelopmentSystem ifTrue:[ |
|
4017 | 1832 |
STCModulePath := UserPreferences current workspaceDirectory / 'modules'. |
3576 | 1833 |
] ifFalse:[ |
4017 | 1834 |
STCModulePath := Filename tempDirectory / 'modules'. |
3576 | 1835 |
]. |
1836 |
||
1837 |
(topDir construct:'stc') exists ifFalse:[ |
|
3960 | 1838 |
('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR. |
1839 |
'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR. |
|
1840 |
STCCompilation := #never. |
|
3576 | 1841 |
]. |
1842 |
||
1843 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
3960 | 1844 |
useBorlandC := useVisualC := useMingw32 := useMingw64 := false. |
1845 |
programFiles := OperatingSystem getEnvironment:'ProgramFiles'. |
|
1846 |
programFiles isEmptyOrNil ifTrue:[ programFiles := 'C:\Program Files' ]. |
|
1847 |
||
1848 |
STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'. |
|
1849 |
||
1850 |
ExternalAddress pointerSize == 4 ifFalse:[ |
|
1851 |
bccTop := nil |
|
1852 |
] ifTrue:[ |
|
1853 |
(bccTop := BCCTop) isNil ifTrue:[ |
|
1854 |
borlandDir := OperatingSystem getEnvironment:'BCCDIR'. |
|
1855 |
borlandDir isEmptyOrNil ifTrue:[ borlandDir := 'C:\Borland\bcc55' ]. |
|
1856 |
bccTop := { |
|
1857 |
(borlandDir) . |
|
1858 |
(programFiles , '\Borland\bcc55') . |
|
1859 |
(programFiles , '\bcc55') . |
|
1860 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] |
|
1861 |
ifNone:nil. |
|
1862 |
]. |
|
1863 |
]. |
|
1864 |
||
1865 |
STCCompilationDefines := '-DWIN32'. |
|
1866 |
||
1867 |
(bccTop notNil and:[bccTop asFilename exists]) ifTrue:[ |
|
1868 |
STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'. |
|
1869 |
LibDirectory := topDirName,'\lib\bc'. |
|
1870 |
LinkArgs := '-L',topDirName,'\lib\bc'. |
|
1871 |
LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'. |
|
1872 |
CCPath := 'bcc32'. |
|
1873 |
MakeCommand := 'bmake'. |
|
1874 |
LinkCommand := 'ilink32'. |
|
1875 |
CCCompilationOptions := '-w-'. |
|
1876 |
useBorlandC := true. |
|
1877 |
] ifFalse:[ |
|
1878 |
ExternalAddress pointerSize == 4 ifFalse:[ |
|
1879 |
vcTop := nil. |
|
1880 |
] ifTrue:[ |
|
1881 |
(vcTop := VCTop) isNil ifTrue:[ |
|
1882 |
vcTop := { |
|
1883 |
(programFiles,'\Microsoft Visual Studio 13.0\VC') . |
|
1884 |
(programFiles,'\Microsoft Visual Studio 12.0\VC') . |
|
1885 |
(programFiles,'\Microsoft Visual Studio 11.0\VC') . |
|
1886 |
(programFiles,'\Microsoft Visual Studio 10.0\VC') . |
|
1887 |
(programFiles,'\Microsoft Visual Studio 9.0\VC' ) . |
|
1888 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] |
|
1889 |
ifNone:nil. |
|
1890 |
]. |
|
1891 |
]. |
|
1892 |
(vcTop notNil and:[vcTop asFilename exists]) ifTrue:[ |
|
1893 |
useVisualC := true. |
|
1894 |
STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'. |
|
1895 |
||
1896 |
(sdkTop := SDKTop) isNil ifTrue:[ |
|
1897 |
sdkTop := { |
|
1898 |
(programFiles,'\Microsoft SDKs\Windows\v9.0A') . |
|
1899 |
(programFiles,'\Microsoft SDKs\Windows\v8.0A') . |
|
1900 |
(programFiles,'\Microsoft SDKs\Windows\v8.0A') . |
|
1901 |
(programFiles,'\Microsoft SDKs\Windows\v7.0A') . |
|
1902 |
(programFiles,'\Microsoft SDKs\Windows\v6.0A') . |
|
1903 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil. |
|
1904 |
]. |
|
1905 |
(sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[ |
|
1906 |
STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'. |
|
1907 |
]. |
|
1908 |
LibDirectory := topDirName,'\lib\vc'. |
|
1909 |
LinkArgs := '-L',topDirName,'\lib\vc'. |
|
1910 |
LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
|
1911 |
CCPath := vcTop,'\bin\cl.exe'. |
|
1912 |
LinkCommand := 'ilink32'. |
|
1913 |
MakeCommand := 'vcmake'. |
|
1914 |
CCCompilationOptions := '/nologo /ZI /w /GF /EHsc /FR.\objvc\'. |
|
1915 |
] ifFalse:[ |
|
1916 |
"/ add definitions for lcc, mingc etc. |
|
1917 |
"/ STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'. |
|
1918 |
ExternalAddress pointerSize == 4 ifTrue:[ |
|
1919 |
(mingwTop := MingwTop) isNil ifTrue:[ |
|
1920 |
mingwTop := { |
|
1921 |
(programFiles,'\mingw') . |
|
1922 |
(programFiles,'\mingw') . |
|
1923 |
('c:\mingw32') . |
|
1924 |
('c:\mingw') . |
|
1925 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]] |
|
1926 |
ifNone:nil. |
|
1927 |
]. |
|
1928 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
1929 |
useMingw32 := true. |
|
1930 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW32__'. |
|
1931 |
CCCompilationOptions := '-w32'. |
|
1932 |
]. |
|
1933 |
] ifFalse:[ |
|
1934 |
(mingwTop := MingwTop) isNil ifTrue:[ |
|
1935 |
mingwTop := { |
|
1936 |
(programFiles,'\mingw64') . |
|
1937 |
(programFiles,'\mingw') . |
|
1938 |
('c:\mingw64') . |
|
1939 |
('c:\mingw') . |
|
1940 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]] |
|
1941 |
ifNone:nil. |
|
1942 |
]. |
|
1943 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
1944 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW64__'. |
|
1945 |
"/ CCCompilationOptions := '-w64'. |
|
1946 |
]. |
|
1947 |
]. |
|
1948 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
1949 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW__'. |
|
1950 |
CCPath := mingwTop,'\bin\gcc.exe'. |
|
1951 |
LinkCommand := 'gcc'. |
|
1952 |
MakeCommand := 'mingwmake'. |
|
1953 |
LibDirectory := topDirName,'\lib\mingw'. |
|
1954 |
LinkArgs := '-L',topDirName,'\lib\mingw'. |
|
1955 |
"/ LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
|
1956 |
]. |
|
1957 |
]. |
|
1958 |
]. |
|
1959 |
STCCompilationOptions := '+optinline +inlineNew'. |
|
1960 |
(topDirName,'\stc\stc.exe') asFilename exists ifTrue:[ |
|
1961 |
STCPath := (topDirName,'\stc\stc.exe'). |
|
1962 |
] ifFalse:[ |
|
1963 |
STCPath := 'stc.exe'. |
|
1964 |
]. |
|
1965 |
LibPath := ''. |
|
1966 |
SearchedLibraries := #('import32.lib'). |
|
1967 |
"/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib'). |
|
3576 | 1968 |
] ifFalse:[ |
3960 | 1969 |
STCCompilationIncludes := '-I',topDirName,'/include'. |
1970 |
STCCompilationDefines := ''. |
|
1971 |
STCCompilationOptions := '+optinline +inlineNew'. |
|
1972 |
STCPath := topDirName,'/stc/stc'. |
|
1973 |
||
1974 |
archArg := picArg := ''. |
|
1975 |
(ExternalAddress pointerSize == 4) ifTrue:[ |
|
1976 |
archArg := ' -m32' |
|
1977 |
] ifFalse:[ |
|
1978 |
archArg := ' -m64'. "gcc -m64 needs -fPIC to make a shared library" |
|
1979 |
picArg := ' -fPIC'. |
|
1980 |
]. |
|
4022 | 1981 |
CCCompilationOptions := STCCompilerInterface getCPUDefine, |
3960 | 1982 |
' -D', self usedCompilerDefine, |
4022 | 1983 |
' ', STCCompilerInterface getOSDefine, |
3960 | 1984 |
' ', '-O', archArg, picArg. |
1985 |
ParserFlags useClang ifTrue:[ |
|
1986 |
CCPath := 'clang' |
|
1987 |
] ifFalse:[ |
|
1988 |
ParserFlags useGnuC ifTrue:[ |
|
1989 |
CCPath := 'gcc' |
|
1990 |
] ifFalse:[ |
|
1991 |
CCPath := 'cc' |
|
1992 |
]. |
|
1993 |
]. |
|
1994 |
LinkArgs := archArg. |
|
1995 |
LinkCommand := CCPath. |
|
1996 |
LinkSharedArgs := '-shared'. |
|
1997 |
||
1998 |
OperatingSystem isOSXlike ifTrue:[ |
|
4017 | 1999 |
LinkSharedArgs := '-shared -mmacosx-version-min=10.5 -arch x86_64 librun.so'. |
2000 |
CCCompilationOptions := CCCompilationOptions ,' -mmacosx-version-min=10.5' |
|
3960 | 2001 |
]. |
2002 |
LibPath := ''. |
|
2003 |
SearchedLibraries := #(). |
|
2004 |
MakeCommand := 'make'. |
|
3576 | 2005 |
]. |
2006 |
||
4025 | 2007 |
(Smalltalk verbose and:[ Smalltalk infoPrinting ]) ifTrue:[ |
4017 | 2008 |
'ParserFlags [info]: STC Setup:' infoPrintCR. |
2009 |
('ParserFlags [info]: STCCompilationDefines: ',(STCCompilationDefines?'')) infoPrintCR. |
|
2010 |
('ParserFlags [info]: CCPath: ',CCPath asString) infoPrintCR. |
|
2011 |
('ParserFlags [info]: CCCompilationOptions: ',(CCCompilationOptions?'')) infoPrintCR. |
|
2012 |
('ParserFlags [info]: LinkCommand: ',LinkCommand asString) infoPrintCR. |
|
2013 |
('ParserFlags [info]: MakeCommand: ',MakeCommand asString) infoPrintCR. |
|
2014 |
('ParserFlags [info]: LinkArgs: ',(LinkArgs?''),' ',(LinkSharedArgs ?'')) infoPrintCR. |
|
2015 |
('ParserFlags [info]: STCModulePath: ',STCModulePath asString) infoPrintCR. |
|
3748 | 2016 |
]. |
2017 |
||
3576 | 2018 |
" |
2019 |
ParserFlags initializeSTCFlagsForTopDirectory:'../..' |
|
4017 | 2020 |
ParserFlags initialize |
3576 | 2021 |
" |
2022 |
||
2023 |
"Modified: / 09-08-2006 / 18:47:18 / fm" |
|
2024 |
"Created: / 06-08-2011 / 19:47:47 / cg" |
|
2025 |
! ! |
|
1634 | 2026 |
|
2685 | 2027 |
!ParserFlags methodsFor:'accessing'! |
2028 |
||
2927 | 2029 |
fullLineNumberInfo |
2030 |
^ (self lineNumberInfo == #full) |
|
2031 |
||
2032 |
"Created: / 26-09-2012 / 14:13:42 / cg" |
|
2033 |
! |
|
2034 |
||
2035 |
lineNumberInfo |
|
2036 |
^ lineNumberInfo |
|
2037 |
||
2038 |
"Created: / 26-09-2012 / 13:27:08 / cg" |
|
2039 |
! |
|
2040 |
||
2041 |
lineNumberInfo:something |
|
2042 |
lineNumberInfo := something. |
|
2043 |
||
2044 |
"Created: / 26-09-2012 / 13:27:17 / cg" |
|
2685 | 2045 |
! ! |
2046 |
||
1658 | 2047 |
!ParserFlags methodsFor:'accessing-compilation control'! |
2048 |
||
1668 | 2049 |
allowExtensionsToPrivateClasses |
2050 |
^ allowExtensionsToPrivateClasses |
|
2051 |
! |
|
2052 |
||
2053 |
allowExtensionsToPrivateClasses:aBoolean |
|
2054 |
allowExtensionsToPrivateClasses := aBoolean |
|
2055 |
! |
|
2056 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2057 |
allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2058 |
^ allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2059 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2060 |
"Created: / 16-11-2006 / 14:24:54 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2061 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2062 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2063 |
allowPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2064 |
allowPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2065 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2066 |
"Created: / 16-11-2006 / 14:24:56 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2067 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2068 |
|
1658 | 2069 |
arraysAreImmutable |
2070 |
^ arraysAreImmutable |
|
2071 |
! |
|
2072 |
||
2073 |
arraysAreImmutable:aBoolean |
|
2074 |
arraysAreImmutable := aBoolean. |
|
2075 |
! |
|
2076 |
||
1717
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
2077 |
flattenVisualWorksNamespaces |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
2078 |
^ true |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
2079 |
! |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
2080 |
|
1658 | 2081 |
stringsAreImmutable |
2082 |
^ stringsAreImmutable |
|
2083 |
! |
|
2084 |
||
2085 |
stringsAreImmutable:aBoolean |
|
2086 |
stringsAreImmutable := aBoolean. |
|
2087 |
! ! |
|
2088 |
||
2089 |
!ParserFlags methodsFor:'accessing-stc compilation control'! |
|
2090 |
||
2091 |
ccCompilationOptions |
|
1668 | 2092 |
^ ccCompilationOptions ? '' |
4043 | 2093 |
|
2094 |
" |
|
2095 |
self ccCompilationOptions |
|
2096 |
" |
|
2097 |
||
2098 |
"Modified (comment): / 17-11-2016 / 15:40:29 / cg" |
|
1658 | 2099 |
! |
2100 |
||
2101 |
ccCompilationOptions:something |
|
2102 |
ccCompilationOptions := something. |
|
2103 |
! |
|
2104 |
||
2105 |
ccPath |
|
2106 |
^ ccPath |
|
4043 | 2107 |
|
2108 |
" |
|
2109 |
self ccPath |
|
2110 |
" |
|
2111 |
||
2112 |
"Modified (comment): / 17-11-2016 / 15:40:40 / cg" |
|
1658 | 2113 |
! |
2114 |
||
2115 |
ccPath:something |
|
2116 |
ccPath := something. |
|
2117 |
! |
|
2118 |
||
2119 |
implicitSelfSends |
|
2120 |
^ implicitSelfSends |
|
2121 |
! |
|
2122 |
||
2123 |
implicitSelfSends:aBoolean |
|
2124 |
implicitSelfSends := aBoolean. |
|
2125 |
! |
|
2126 |
||
2127 |
libPath |
|
2128 |
^ libPath |
|
4043 | 2129 |
|
2130 |
" |
|
2131 |
self libPath |
|
2132 |
" |
|
2133 |
||
2134 |
"Modified (comment): / 17-11-2016 / 15:40:52 / cg" |
|
1658 | 2135 |
! |
2136 |
||
2137 |
libPath:aString |
|
2138 |
libPath := aString |
|
2139 |
! |
|
2140 |
||
2141 |
linkArgs |
|
2142 |
^ linkArgs |
|
4043 | 2143 |
|
2144 |
" |
|
2145 |
self linkArgs |
|
2146 |
" |
|
2147 |
||
2148 |
"Modified (comment): / 17-11-2016 / 15:41:03 / cg" |
|
1658 | 2149 |
! |
2150 |
||
2151 |
linkArgs:aString |
|
2152 |
linkArgs := aString |
|
2153 |
! |
|
2154 |
||
2155 |
linkCommand |
|
2156 |
^ linkCommand |
|
4043 | 2157 |
|
2158 |
" |
|
2159 |
self linkCommand |
|
2160 |
" |
|
2161 |
||
2162 |
"Modified (comment): / 17-11-2016 / 15:41:16 / cg" |
|
1658 | 2163 |
! |
2164 |
||
2165 |
linkCommand:aString |
|
2166 |
linkCommand := aString |
|
2167 |
! |
|
2168 |
||
1898 | 2169 |
linkSharedArgs |
2170 |
^ linkSharedArgs |
|
2171 |
! |
|
2172 |
||
2173 |
linkSharedArgs:aString |
|
2174 |
linkSharedArgs := aString |
|
2175 |
! |
|
2176 |
||
1658 | 2177 |
searchedLibraries |
2178 |
^ searchedLibraries |
|
2179 |
! |
|
2180 |
||
2181 |
searchedLibraries:aString |
|
2182 |
searchedLibraries := aString |
|
2183 |
! |
|
2184 |
||
2185 |
stcCompilation |
|
2186 |
^ stcCompilation |
|
2187 |
! |
|
2188 |
||
2189 |
stcCompilation:something |
|
2190 |
stcCompilation := something. |
|
2191 |
! |
|
2192 |
||
2193 |
stcCompilationDefines |
|
2194 |
^ stcCompilationDefines |
|
2195 |
! |
|
2196 |
||
2197 |
stcCompilationDefines:something |
|
2198 |
stcCompilationDefines := something. |
|
2199 |
! |
|
2200 |
||
2201 |
stcCompilationIncludes |
|
2202 |
^ stcCompilationIncludes |
|
4043 | 2203 |
|
2204 |
" |
|
2205 |
self stcCompilationIncludes |
|
2206 |
" |
|
2207 |
||
2208 |
"Modified (comment): / 17-11-2016 / 15:41:43 / cg" |
|
1658 | 2209 |
! |
2210 |
||
2211 |
stcCompilationIncludes:something |
|
2212 |
stcCompilationIncludes := something. |
|
2213 |
! |
|
2214 |
||
2215 |
stcCompilationOptions |
|
2216 |
^ stcCompilationOptions |
|
2217 |
! |
|
2218 |
||
2219 |
stcCompilationOptions:something |
|
2220 |
stcCompilationOptions := something. |
|
2221 |
! |
|
2222 |
||
2223 |
stcKeepCIntermediate |
|
2701
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2224 |
^ stcKeepCIntermediate ? false |
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2225 |
|
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2226 |
"Modified: / 16-09-2011 / 19:56:22 / cg" |
1658 | 2227 |
! |
2228 |
||
2229 |
stcKeepCIntermediate:something |
|
2230 |
stcKeepCIntermediate := something. |
|
2231 |
! |
|
2232 |
||
2233 |
stcKeepOIntermediate |
|
2702 | 2234 |
^ stcKeepOIntermediate ? false |
2235 |
||
2236 |
"Modified: / 16-09-2011 / 19:56:52 / cg" |
|
1658 | 2237 |
! |
2238 |
||
2239 |
stcKeepOIntermediate:something |
|
2240 |
stcKeepOIntermediate := something. |
|
2241 |
! |
|
2242 |
||
2490 | 2243 |
stcKeepSIntermediate |
2244 |
^ false |
|
2245 |
"/ ^ true |
|
2246 |
! |
|
2247 |
||
1658 | 2248 |
stcKeepSTIntermediate |
2702 | 2249 |
^ stcKeepSTIntermediate ? false |
2250 |
||
2251 |
"Modified: / 16-09-2011 / 19:57:11 / cg" |
|
1658 | 2252 |
! |
2253 |
||
2254 |
stcKeepSTIntermediate:something |
|
2255 |
stcKeepSTIntermediate := something. |
|
2256 |
! |
|
2257 |
||
2258 |
stcModulePath |
|
4012 | 2259 |
stcModulePath isNil ifTrue:[^ self class stcModulePath]. |
2260 |
^ stcModulePath |
|
1658 | 2261 |
! |
2262 |
||
4013 | 2263 |
stcModulePath:aPath |
2264 |
"set the path to the directory (for an individual compilation context). |
|
2265 |
Obsolete now, as this should not be set from the outside, |
|
2266 |
but instead rely totally on the userPreferences." |
|
2267 |
||
2268 |
stcModulePath := aPath. |
|
1658 | 2269 |
! |
2270 |
||
2271 |
stcPath |
|
2272 |
^ stcPath |
|
2273 |
! |
|
2274 |
||
4017 | 2275 |
stcPath:aPath |
2276 |
stcPath := aPath. |
|
1658 | 2277 |
! ! |
2278 |
||
2279 |
!ParserFlags methodsFor:'accessing-syntax-control'! |
|
1634 | 2280 |
|
2281 |
allowArrayIndexSyntaxExtension |
|
4179 | 2282 |
^ allowArrayIndexSyntaxExtension ? false |
2283 |
||
2284 |
"Modified: / 08-08-2017 / 16:57:03 / cg" |
|
1634 | 2285 |
! |
2286 |
||
2287 |
allowArrayIndexSyntaxExtension:aBoolean |
|
2288 |
allowArrayIndexSyntaxExtension := aBoolean. |
|
2289 |
! |
|
2290 |
||
3220 | 2291 |
allowAssignmentToBlockArgument |
2292 |
^ allowAssignmentToBlockArgument |
|
2293 |
! |
|
2294 |
||
2295 |
allowAssignmentToBlockArgument:aBoolean |
|
2296 |
allowAssignmentToBlockArgument := aBoolean. |
|
2297 |
! |
|
2298 |
||
2299 |
allowAssignmentToMethodArgument |
|
2300 |
^ allowAssignmentToMethodArgument |
|
2301 |
! |
|
2302 |
||
2303 |
allowAssignmentToMethodArgument:aBoolean |
|
2304 |
allowAssignmentToMethodArgument := aBoolean. |
|
2305 |
! |
|
2306 |
||
2307 |
allowAssignmentToPoolVariable |
|
2308 |
^ allowAssignmentToPoolVariable |
|
2309 |
! |
|
2310 |
||
2311 |
allowAssignmentToPoolVariable:aBoolean |
|
2312 |
allowAssignmentToPoolVariable := aBoolean. |
|
2313 |
! |
|
2314 |
||
2306 | 2315 |
allowCaretAsBinop |
2316 |
^ allowCaretAsBinop |
|
2317 |
! |
|
2318 |
||
2319 |
allowCaretAsBinop:aBoolean |
|
2320 |
allowCaretAsBinop := aBoolean. |
|
2321 |
! |
|
2322 |
||
2312 | 2323 |
allowCharacterEscapes |
2324 |
^ allowCharacterEscapes |
|
2325 |
! |
|
2326 |
||
2327 |
allowCharacterEscapes:aBoolean |
|
2328 |
allowCharacterEscapes := aBoolean. |
|
2329 |
! |
|
2330 |
||
1634 | 2331 |
allowDollarInIdentifier |
2332 |
^ allowDollarInIdentifier |
|
2333 |
! |
|
2334 |
||
2335 |
allowDollarInIdentifier:aBoolean |
|
2336 |
allowDollarInIdentifier := aBoolean. |
|
2337 |
! |
|
2338 |
||
2339 |
allowDolphinExtensions |
|
2340 |
^ allowDolphinExtensions |
|
2341 |
! |
|
2342 |
||
2343 |
allowDolphinExtensions:aBoolean |
|
2344 |
allowDolphinExtensions := aBoolean |
|
2345 |
! |
|
2346 |
||
2347 |
allowDomainVariables |
|
2348 |
^ allowDomainVariables |
|
2349 |
! |
|
2350 |
||
2351 |
allowDomainVariables:aBoolean |
|
2352 |
allowDomainVariables := aBoolean. |
|
2353 |
! |
|
2354 |
||
1950 | 2355 |
allowEmptyStatements |
2356 |
^ allowEmptyStatements ? false |
|
2357 |
||
2358 |
"Created: / 20-11-2006 / 13:56:14 / cg" |
|
2359 |
! |
|
2360 |
||
2361 |
allowEmptyStatements:aBoolean |
|
2362 |
allowEmptyStatements := aBoolean. |
|
2363 |
||
2364 |
"Created: / 20-11-2006 / 14:26:48 / cg" |
|
2365 |
! |
|
2366 |
||
1634 | 2367 |
allowExtendedBinarySelectors |
2368 |
^ allowExtendedBinarySelectors |
|
2369 |
! |
|
2370 |
||
2371 |
allowExtendedBinarySelectors:aBoolean |
|
2372 |
allowExtendedBinarySelectors := aBoolean. |
|
2373 |
! |
|
2374 |
||
2375 |
allowExtendedSTXSyntax |
|
2376 |
^ allowExtendedSTXSyntax |
|
2377 |
! |
|
2378 |
||
3220 | 2379 |
allowExtendedSTXSyntax:aBoolean |
2380 |
allowExtendedSTXSyntax := aBoolean. |
|
1634 | 2381 |
! |
2382 |
||
2383 |
allowFixedPointLiterals |
|
2384 |
^ allowFixedPointLiterals |
|
2385 |
! |
|
2386 |
||
3220 | 2387 |
allowFixedPointLiterals:aBoolean |
2388 |
allowFixedPointLiterals := aBoolean. |
|
1634 | 2389 |
! |
2390 |
||
2391 |
allowFunctionCallSyntaxForBlockEvaluation |
|
4179 | 2392 |
^ allowFunctionCallSyntaxForBlockEvaluation ? false |
2393 |
||
2394 |
"Modified: / 08-08-2017 / 16:57:17 / cg" |
|
1634 | 2395 |
! |
2396 |
||
2397 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean |
|
2398 |
allowFunctionCallSyntaxForBlockEvaluation := aBoolean. |
|
2399 |
! |
|
2400 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2401 |
allowHashAsBinarySelector |
1713 | 2402 |
^ allowHashAsBinarySelector |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2403 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2404 |
|
4185 | 2405 |
allowJavaScriptConst |
2406 |
^ allowJavaScriptConst |
|
2407 |
||
2408 |
"Created: / 08-08-2017 / 23:50:12 / cg" |
|
2409 |
! |
|
2410 |
||
2411 |
allowJavaScriptConst:aBoolean |
|
2412 |
allowJavaScriptConst := aBoolean |
|
2413 |
||
2414 |
"Created: / 08-08-2017 / 23:50:23 / cg" |
|
2415 |
! |
|
2416 |
||
4238 | 2417 |
allowJavaScriptLet |
2418 |
^ self class allowJavaScriptLet |
|
2419 |
||
2420 |
"Created: / 08-08-2017 / 23:50:12 / cg" |
|
2421 |
! |
|
2422 |
||
1634 | 2423 |
allowLazyValueExtension |
2424 |
^ allowLazyValueExtension |
|
2425 |
! |
|
2426 |
||
3220 | 2427 |
allowLazyValueExtension:aBoolean |
2428 |
allowLazyValueExtension := aBoolean. |
|
1634 | 2429 |
! |
2430 |
||
2431 |
allowLiteralNameSpaceSymbols |
|
2432 |
^ allowLiteralNameSpaceSymbols |
|
2433 |
! |
|
2434 |
||
2435 |
allowLiteralNameSpaceSymbols:aBoolean |
|
2436 |
allowLiteralNameSpaceSymbols := aBoolean |
|
2437 |
! |
|
2438 |
||
2439 |
allowLocalVariableDeclarationWithInitializerExpression |
|
2440 |
^ allowLocalVariableDeclarationWithInitializerExpression |
|
2441 |
! |
|
2442 |
||
2443 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean |
|
2444 |
allowLocalVariableDeclarationWithInitializerExpression := aBoolean. |
|
2445 |
! |
|
2446 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2447 |
allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2448 |
^ allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2449 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2450 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2451 |
allowNationalCharactersInIdentifier:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2452 |
allowNationalCharactersInIdentifier := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2453 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2454 |
|
1634 | 2455 |
allowOldStyleAssignment |
4039 | 2456 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed" |
2457 |
||
1634 | 2458 |
^ allowOldStyleAssignment |
2459 |
! |
|
2460 |
||
2461 |
allowOldStyleAssignment:aBoolean |
|
4039 | 2462 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed" |
2463 |
||
1634 | 2464 |
allowOldStyleAssignment := aBoolean |
2465 |
! |
|
2466 |
||
4041 | 2467 |
allowParagraphInIdentifier |
2468 |
^ allowParagraphInIdentifier |
|
2469 |
||
2470 |
"Created: / 16-11-2016 / 22:29:06 / cg" |
|
2471 |
! |
|
2472 |
||
2473 |
allowParagraphInIdentifier:aBoolean |
|
2474 |
allowParagraphInIdentifier := aBoolean. |
|
2475 |
||
2476 |
"Created: / 16-11-2016 / 22:29:14 / cg" |
|
2477 |
! |
|
2478 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2479 |
allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2480 |
^ allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2481 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2482 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2483 |
allowPeriodInSymbol:aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2484 |
allowPeriodInSymbol := aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2485 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2486 |
|
1634 | 2487 |
allowQualifiedNames |
2488 |
^ allowQualifiedNames |
|
2489 |
! |
|
2490 |
||
2491 |
allowQualifiedNames:aBoolean |
|
2492 |
allowQualifiedNames := aBoolean. |
|
2493 |
! |
|
2494 |
||
2495 |
allowReservedWordsAsSelectors |
|
2496 |
^ allowReservedWordsAsSelectors |
|
2497 |
! |
|
2498 |
||
2499 |
allowReservedWordsAsSelectors:aBoolean |
|
2500 |
allowReservedWordsAsSelectors := aBoolean. |
|
2501 |
! |
|
2502 |
||
1703 | 2503 |
allowSTVExtensions |
2504 |
"return true, if support for ST/V extensions is enabled." |
|
2505 |
||
2506 |
^ allowSTVExtensions |
|
2507 |
! |
|
2508 |
||
1701 | 2509 |
allowSTVPrimitives |
2510 |
"return true, if support for ST/V primitives is enabled." |
|
2511 |
||
2512 |
^ allowSTVPrimitives |
|
2513 |
! |
|
2514 |
||
2984 | 2515 |
allowSTXDelimiterComments |
3946 | 2516 |
"are ST/X token-delimited comments allowed? |
2517 |
(see comment on class side)" |
|
2518 |
||
2984 | 2519 |
^ allowSTXDelimiterComments |
2520 |
! |
|
2521 |
||
2522 |
allowSTXDelimiterComments:aBoolean |
|
3946 | 2523 |
"are ST/X token-delimited comments allowed? |
2524 |
(see comment on class side)" |
|
2525 |
||
2984 | 2526 |
allowSTXDelimiterComments := aBoolean. |
2527 |
||
2528 |
" |
|
2529 |
ParserFlags allowSTXDelimiterComments:false |
|
2530 |
ParserFlags allowSTXDelimiterComments:true |
|
2531 |
" |
|
2532 |
! |
|
2533 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2534 |
allowSTXEOLComments |
3946 | 2535 |
"are ST/X end-of-line comments allowed?" |
2536 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2537 |
^ allowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2538 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2539 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2540 |
allowSTXEOLComments:aBoolean |
3946 | 2541 |
"are ST/X end-of-line comments allowed?" |
2542 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2543 |
allowSTXEOLComments := aBoolean. |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2544 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2545 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2546 |
ParserFlags allowSTXEOLComments:false |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2547 |
ParserFlags allowSTXEOLComments:true |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2548 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2549 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
2550 |
|
3945 | 2551 |
allowSTXExtendedArrayLiterals |
3946 | 2552 |
"are scheme-style typed literal arrays allowed?" |
2553 |
||
3945 | 2554 |
^ allowSTXExtendedArrayLiterals ? false |
2555 |
! |
|
2556 |
||
2557 |
allowSTXExtendedArrayLiterals:aBoolean |
|
3946 | 2558 |
"are scheme-style typed literal arrays allowed?" |
2559 |
||
3945 | 2560 |
allowSTXExtendedArrayLiterals := aBoolean |
2561 |
! |
|
2562 |
||
2494 | 2563 |
allowSTXFunctions |
2564 |
^ false |
|
2565 |
||
2566 |
"Created: / 23-05-2011 / 17:43:45 / cg" |
|
2567 |
! |
|
2568 |
||
3783 | 2569 |
allowSignedByteArrayElements |
4085 | 2570 |
^ allowSignedByteArrayElements |
2571 |
! |
|
2572 |
||
2573 |
allowSignedByteArrayElements:aBoolean |
|
2574 |
allowSignedByteArrayElements := aBoolean |
|
3783 | 2575 |
! |
2576 |
||
3576 | 2577 |
allowSqueakExtensions |
2578 |
"return true, if support for squeak extensions |
|
2579 |
computed arrays { .., } |
|
2580 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
2581 |
is enabled." |
|
2582 |
||
2583 |
^ allowSqueakExtensions |
|
2584 |
! |
|
2585 |
||
2586 |
allowSqueakExtensions:aBoolean |
|
2587 |
"this allows turning on/off support for squeak extensions: |
|
2588 |
computed arrays { .., } |
|
2589 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
2590 |
" |
|
2591 |
||
2592 |
allowSqueakExtensions := aBoolean |
|
2593 |
! |
|
1634 | 2594 |
|
1689 | 2595 |
allowSqueakPrimitives |
2596 |
"return true, if support for squeak primitives is enabled." |
|
2597 |
||
2598 |
^ allowSqueakPrimitives |
|
2599 |
! |
|
2600 |
||
2601 |
allowSqueakPrimitives:aBoolean |
|
2602 |
"this allows turning on/off support for squeak primitives" |
|
2603 |
||
2604 |
allowSqueakPrimitives := aBoolean |
|
2605 |
! |
|
2606 |
||
2313 | 2607 |
allowStringEscapes |
2608 |
^ allowStringEscapes |
|
2609 |
! |
|
2610 |
||
2611 |
allowStringEscapes:aBoolean |
|
2612 |
allowStringEscapes := aBoolean. |
|
2613 |
! |
|
2614 |
||
4149 | 2615 |
allowSymbolsStartingWithDigit |
2616 |
"return true, if a symbol is allowed to start with a digit |
|
2617 |
i.e. as in #2D. |
|
2618 |
This seems to be ok in new Squeak/Pharo versions" |
|
2619 |
||
2620 |
^ allowSymbolsStartingWithDigit |
|
2621 |
||
2622 |
"Created: / 18-06-2017 / 16:26:08 / cg" |
|
2623 |
! |
|
2624 |
||
2625 |
allowSymbolsStartingWithDigit:aBoolean |
|
2626 |
"control if a symbol is allowed to start with a digit |
|
2627 |
i.e. as in #2D. |
|
2628 |
This seems to be ok in new Squeak/Pharo versions" |
|
2629 |
||
2630 |
allowSymbolsStartingWithDigit := aBoolean |
|
2631 |
||
2632 |
"Created: / 18-06-2017 / 16:26:23 / cg" |
|
2633 |
! |
|
2634 |
||
1634 | 2635 |
allowUnderscoreInIdentifier |
2636 |
^ allowUnderscoreInIdentifier |
|
2637 |
! |
|
2638 |
||
2639 |
allowUnderscoreInIdentifier:aBoolean |
|
2640 |
allowUnderscoreInIdentifier := aBoolean |
|
2641 |
! |
|
2642 |
||
2310 | 2643 |
allowUnicodeCharacters |
2644 |
^ allowUnicodeCharacters |
|
2645 |
! |
|
2646 |
||
2647 |
allowUnicodeCharacters:aBoolean |
|
2648 |
allowUnicodeCharacters := aBoolean |
|
2649 |
! |
|
2650 |
||
2307 | 2651 |
allowUnicodeStrings |
2652 |
^ allowUnicodeStrings |
|
2653 |
! |
|
2654 |
||
2655 |
allowUnicodeStrings:aBoolean |
|
2656 |
allowUnicodeStrings := aBoolean |
|
2657 |
! |
|
2658 |
||
1634 | 2659 |
allowVariableReferences |
2660 |
^ allowVariableReferences |
|
2661 |
! |
|
2662 |
||
2663 |
allowVariableReferences:aBoolean |
|
2664 |
allowVariableReferences := aBoolean. |
|
2665 |
! |
|
2666 |
||
1655 | 2667 |
allowVisualAgeESSymbolLiterals |
2668 |
^ allowVisualAgeESSymbolLiterals |
|
2669 |
! |
|
2670 |
||
2671 |
allowVisualAgeESSymbolLiterals:aBoolean |
|
2672 |
allowVisualAgeESSymbolLiterals := aBoolean. |
|
1689 | 2673 |
! |
2674 |
||
2675 |
allowVisualAgePrimitives |
|
2676 |
"return true, if support for V'Age primitives is enabled." |
|
2677 |
||
2678 |
^ allowVisualAgePrimitives |
|
2679 |
! |
|
2680 |
||
2681 |
allowVisualAgePrimitives:aBoolean |
|
2682 |
"this allows turning on/off support for V'Age primitives" |
|
2683 |
||
2684 |
allowVisualAgePrimitives := aBoolean |
|
1773 | 2685 |
! |
2686 |
||
2687 |
allowVisualWorksMethodAnnotations |
|
2688 |
"return true, if support for V'Works extended primitive syntax for method annotations." |
|
2689 |
||
2690 |
^ allowVisualWorksMethodAnnotations |
|
2691 |
||
2692 |
"Created: / 07-07-2006 / 15:48:30 / cg" |
|
2693 |
! |
|
2694 |
||
2695 |
allowVisualWorksMethodAnnotations:aBoolean |
|
2696 |
"turn on/off support for V'Works extended primitive syntax for method annotations." |
|
2697 |
||
3355 | 2698 |
allowVisualWorksMethodAnnotations := aBoolean |
1773 | 2699 |
|
2700 |
"Created: / 07-07-2006 / 15:49:03 / cg" |
|
3220 | 2701 |
! |
2702 |
||
2703 |
warnAssignmentToBlockArgument |
|
2704 |
^ warnAssignmentToBlockArgument |
|
2705 |
! |
|
2706 |
||
2707 |
warnAssignmentToBlockArgument:aBoolean |
|
2708 |
warnAssignmentToBlockArgument := aBoolean. |
|
2709 |
! |
|
2710 |
||
2711 |
warnAssignmentToMethodArgument |
|
2712 |
^ warnAssignmentToMethodArgument |
|
2713 |
! |
|
2714 |
||
2715 |
warnAssignmentToMethodArgument:aBoolean |
|
2716 |
warnAssignmentToMethodArgument := aBoolean. |
|
2717 |
! |
|
2718 |
||
2719 |
warnAssignmentToPoolVariable |
|
2720 |
^ warnAssignmentToPoolVariable |
|
2721 |
! |
|
2722 |
||
2723 |
warnAssignmentToPoolVariable:aBoolean |
|
2724 |
warnAssignmentToPoolVariable := aBoolean. |
|
1658 | 2725 |
! ! |
1634 | 2726 |
|
1658 | 2727 |
!ParserFlags methodsFor:'accessing-warning-control'! |
1634 | 2728 |
|
1652 | 2729 |
warnAboutBadComments |
2730 |
^ warnAboutBadComments |
|
2731 |
! |
|
2732 |
||
2733 |
warnAboutBadComments:aBoolean |
|
2734 |
warnAboutBadComments := aBoolean. |
|
2735 |
! |
|
2736 |
||
1811 | 2737 |
warnAboutNonLowercaseLocalVariableNames |
2738 |
^ warnAboutNonLowercaseLocalVariableNames |
|
1740 | 2739 |
! |
2740 |
||
1811 | 2741 |
warnAboutNonLowercaseLocalVariableNames:aBoolean |
2742 |
warnAboutNonLowercaseLocalVariableNames := aBoolean. |
|
1740 | 2743 |
! |
2744 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2745 |
warnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2746 |
^ warnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2747 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2748 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2749 |
warnAboutPeriodInSymbol:aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2750 |
warnAboutPeriodInSymbol := aBoolean. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2751 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
2752 |
|
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2753 |
warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2754 |
^ warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2755 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2756 |
"Created: / 16-11-2006 / 14:24:38 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2757 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2758 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2759 |
warnAboutPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2760 |
warnAboutPossibleSTCCompilationProblems := aBoolean. |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2761 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2762 |
"Created: / 16-11-2006 / 14:24:40 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2763 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2764 |
|
2121 | 2765 |
warnAboutPossiblyUnimplementedSelectors |
2766 |
^ warnAboutPossiblyUnimplementedSelectors |
|
2767 |
! |
|
2768 |
||
2769 |
warnAboutPossiblyUnimplementedSelectors:aBoolean |
|
2770 |
warnAboutPossiblyUnimplementedSelectors := aBoolean. |
|
2771 |
! |
|
2772 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2773 |
warnAboutReferenceToPrivateClass |
3396 | 2774 |
"controls generation of warning messages when a private class is referenced" |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2775 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2776 |
^ warnAboutReferenceToPrivateClass |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2777 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2778 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2779 |
warnAboutReferenceToPrivateClass:aBoolean |
3396 | 2780 |
"controls generation of warning messages when a private class is referenced" |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2781 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2782 |
warnAboutReferenceToPrivateClass := aBoolean |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2783 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2784 |
|
2079
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2785 |
warnAboutShortLocalVariableNames |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2786 |
^ warnAboutShortLocalVariableNames |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2787 |
! |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2788 |
|
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2789 |
warnAboutShortLocalVariableNames:aBoolean |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2790 |
warnAboutShortLocalVariableNames := aBoolean. |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2791 |
! |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
2792 |
|
2738 | 2793 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
2739 | 2794 |
^ warnAboutUnknownCharacterEscapesInJavaScriptStringConstant ? false |
2738 | 2795 |
|
2796 |
"Created: / 04-10-2011 / 19:51:19 / cg" |
|
2797 |
! |
|
2798 |
||
2799 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean |
|
2800 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean. |
|
2801 |
||
2802 |
"Created: / 04-10-2011 / 19:51:27 / cg" |
|
2803 |
! |
|
2804 |
||
1634 | 2805 |
warnAboutVariableNameConventions |
2806 |
^ warnAboutVariableNameConventions |
|
2807 |
! |
|
2808 |
||
2809 |
warnAboutVariableNameConventions:aBoolean |
|
2810 |
warnAboutVariableNameConventions := aBoolean. |
|
2811 |
! |
|
2812 |
||
2813 |
warnAboutWrongVariableNames |
|
2814 |
^ warnAboutWrongVariableNames |
|
2815 |
! |
|
2816 |
||
2817 |
warnAboutWrongVariableNames:aBoolean |
|
2818 |
warnAboutWrongVariableNames := aBoolean. |
|
2819 |
! |
|
2820 |
||
2821 |
warnCommonMistakes |
|
2822 |
^ warnCommonMistakes |
|
2823 |
! |
|
2824 |
||
2825 |
warnCommonMistakes:aBoolean |
|
2826 |
warnCommonMistakes := aBoolean. |
|
2827 |
! |
|
2828 |
||
2829 |
warnDollarInIdentifier |
|
2830 |
^ warnDollarInIdentifier |
|
2831 |
! |
|
2832 |
||
2833 |
warnDollarInIdentifier:aBoolean |
|
2834 |
warnDollarInIdentifier := aBoolean. |
|
2835 |
! |
|
2836 |
||
1638 | 2837 |
warnHiddenVariables |
2838 |
^ warnHiddenVariables |
|
2839 |
! |
|
2840 |
||
2841 |
warnHiddenVariables:aBoolean |
|
2465 | 2842 |
"controls generation of warning messages about hiding variables by locals" |
2843 |
||
1638 | 2844 |
warnHiddenVariables := aBoolean. |
2465 | 2845 |
|
2846 |
"Modified: / 30-11-2010 / 15:00:55 / cg" |
|
1638 | 2847 |
! |
2848 |
||
1682 | 2849 |
warnInconsistentReturnValues |
2850 |
^ warnInconsistentReturnValues |
|
2851 |
! |
|
2852 |
||
2853 |
warnInconsistentReturnValues:aBoolean |
|
2854 |
warnInconsistentReturnValues := aBoolean. |
|
2855 |
! |
|
2856 |
||
1634 | 2857 |
warnOldStyleAssignment |
2858 |
^ warnOldStyleAssignment |
|
2859 |
! |
|
2860 |
||
2861 |
warnOldStyleAssignment:aBoolean |
|
2862 |
warnOldStyleAssignment := aBoolean. |
|
2863 |
! |
|
2864 |
||
4041 | 2865 |
warnParagraphInIdentifier |
2866 |
^ warnParagraphInIdentifier |
|
2867 |
||
2868 |
"Created: / 16-11-2016 / 22:29:33 / cg" |
|
2869 |
! |
|
2870 |
||
2871 |
warnParagraphInIdentifier:aBoolean |
|
2872 |
warnParagraphInIdentifier := aBoolean. |
|
2873 |
||
2874 |
"Created: / 16-11-2016 / 22:29:45 / cg" |
|
2875 |
! |
|
2876 |
||
2787 | 2877 |
warnPlausibilityChecks |
2878 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
2879 |
||
2789
3100327ad683
changed: #warnPlausibilityChecks
Claus Gittinger <cg@exept.de>
parents:
2787
diff
changeset
|
2880 |
^ warnPlausibilityChecks ? true |
2787 | 2881 |
|
2882 |
"Created: / 19-01-2012 / 10:38:54 / cg" |
|
2883 |
! |
|
2884 |
||
2885 |
warnPlausibilityChecks:aBoolean |
|
2886 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
2887 |
||
2888 |
warnPlausibilityChecks := aBoolean |
|
2889 |
||
2890 |
"Created: / 19-01-2012 / 10:39:02 / cg" |
|
2891 |
! |
|
2892 |
||
1634 | 2893 |
warnPossibleIncompatibilities |
2057 | 2894 |
"holds true, if possible incompatibilities (with other ST systems) |
2895 |
are to be warned about" |
|
2896 |
||
1634 | 2897 |
^ warnPossibleIncompatibilities |
2898 |
! |
|
2899 |
||
2900 |
warnPossibleIncompatibilities:aBoolean |
|
2057 | 2901 |
"holds true, if possible incompatibilities (with other ST systems) |
2902 |
are to be warned about" |
|
2903 |
||
1634 | 2904 |
warnPossibleIncompatibilities := aBoolean. |
2905 |
! |
|
2906 |
||
2907 |
warnST80Directives |
|
2908 |
^ warnST80Directives |
|
2909 |
! |
|
2910 |
||
2476 | 2911 |
warnST80Directives:aBoolean |
2912 |
warnST80Directives := aBoolean. |
|
2913 |
||
2914 |
"Modified: / 30-01-2011 / 13:01:06 / cg" |
|
1634 | 2915 |
! |
2916 |
||
2917 |
warnSTXHereExtensionUsed |
|
2918 |
^ warnSTXHereExtensionUsed |
|
2919 |
! |
|
2920 |
||
2921 |
warnSTXHereExtensionUsed:aBoolean |
|
2922 |
warnSTXHereExtensionUsed := aBoolean. |
|
2923 |
! |
|
2924 |
||
2925 |
warnSTXNameSpaceUse |
|
2926 |
^ warnSTXNameSpaceUse |
|
2927 |
! |
|
2928 |
||
2929 |
warnSTXNameSpaceUse:aBoolean |
|
2930 |
warnSTXNameSpaceUse := aBoolean. |
|
2931 |
! |
|
2932 |
||
2933 |
warnSTXSpecialComment |
|
2934 |
^ warnSTXSpecialComment |
|
2935 |
! |
|
2936 |
||
2937 |
warnSTXSpecialComment:aBoolean |
|
2938 |
warnSTXSpecialComment := aBoolean. |
|
2939 |
! |
|
2940 |
||
2941 |
warnUndeclared |
|
2942 |
^ warnUndeclared |
|
2943 |
! |
|
2944 |
||
2945 |
warnUndeclared:aBoolean |
|
2946 |
warnUndeclared := aBoolean. |
|
2947 |
! |
|
2948 |
||
2949 |
warnUnderscoreInIdentifier |
|
2950 |
^ warnUnderscoreInIdentifier |
|
2951 |
! |
|
2952 |
||
2953 |
warnUnderscoreInIdentifier:aBoolean |
|
2954 |
warnUnderscoreInIdentifier := aBoolean. |
|
2955 |
! |
|
2956 |
||
2957 |
warnUnusedVars |
|
2958 |
^ warnUnusedVars |
|
2959 |
! |
|
2960 |
||
2961 |
warnUnusedVars:aBoolean |
|
2962 |
warnUnusedVars := aBoolean. |
|
1662 | 2963 |
! |
2964 |
||
2965 |
warnings |
|
2477 | 2966 |
^ warnings ? true |
2967 |
||
2968 |
"Modified: / 30-01-2011 / 13:05:48 / cg" |
|
1662 | 2969 |
! |
2970 |
||
2476 | 2971 |
warnings:aBoolean |
2972 |
warnings := aBoolean. |
|
2973 |
||
2974 |
"Modified: / 30-01-2011 / 13:00:51 / cg" |
|
1634 | 2975 |
! ! |
2976 |
||
2977 |
!ParserFlags methodsFor:'initialization'! |
|
2978 |
||
2979 |
initialize |
|
3220 | 2980 |
"each instance is initially setup from the classes global defaults. |
2981 |
(but can be changed as required for an individual compilation run" |
|
2982 |
||
1662 | 2983 |
warnings := Warnings. |
1634 | 2984 |
warnUndeclared := WarnUndeclared. |
2985 |
warnUnusedVars := WarnUnusedVars. |
|
2986 |
warnST80Directives := WarnST80Directives. |
|
2987 |
warnSTXSpecialComment := WarnSTXSpecials. |
|
2988 |
warnSTXNameSpaceUse := WarnSTXSpecials. |
|
2989 |
warnSTXHereExtensionUsed := WarnSTXSpecials. |
|
2990 |
warnUnderscoreInIdentifier := WarnUnderscoreInIdentifier. |
|
2991 |
warnDollarInIdentifier := WarnDollarInIdentifier. |
|
4041 | 2992 |
warnParagraphInIdentifier := WarnParagraphInIdentifier. |
1634 | 2993 |
warnOldStyleAssignment := WarnOldStyleAssignment. |
2994 |
warnCommonMistakes := WarnCommonMistakes. |
|
2995 |
warnPossibleIncompatibilities := WarnPossibleIncompatibilities. |
|
2996 |
warnAboutVariableNameConventions := WarnAboutVariableNameConventions. |
|
2997 |
warnAboutWrongVariableNames := WarnAboutWrongVariableNames. |
|
1652 | 2998 |
warnAboutBadComments := WarnAboutBadComments. |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
2999 |
warnAboutReferenceToPrivateClass := WarnAboutReferenceToPrivateClass. |
1638 | 3000 |
warnHiddenVariables := WarnHiddenVariables. |
1682 | 3001 |
warnInconsistentReturnValues := WarnInconsistentReturnValues. |
1811 | 3002 |
warnAboutNonLowercaseLocalVariableNames := WarnAboutNonLowercaseLocalVariableNames. |
2079
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3003 |
warnAboutShortLocalVariableNames := WarnAboutShortLocalVariableNames. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3004 |
warnAboutPossibleSTCCompilationProblems := WarnAboutPossibleSTCCompilationProblems. |
2121 | 3005 |
warnAboutPossiblyUnimplementedSelectors := WarnAboutPossiblyUnimplementedSelectors. |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3006 |
warnAboutPeriodInSymbol := WarnAboutPeriodInSymbol. |
2738 | 3007 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant := WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant. |
2787 | 3008 |
warnPlausibilityChecks := WarnPlausibilityChecks. |
3220 | 3009 |
warnAssignmentToBlockArgument := WarnAssignmentToBlockArgument. |
3010 |
warnAssignmentToMethodArgument := WarnAssignmentToMethodArgument. |
|
3396 | 3011 |
warnAssignmentToPoolVariable := WarnAssignmentToPoolVariable. |
1634 | 3012 |
|
3013 |
allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier. |
|
3014 |
allowDollarInIdentifier := AllowDollarInIdentifier. |
|
4041 | 3015 |
allowParagraphInIdentifier := AllowParagraphInIdentifier. |
1634 | 3016 |
allowOldStyleAssignment := AllowOldStyleAssignment. |
3017 |
allowSqueakExtensions := AllowSqueakExtensions. |
|
3018 |
allowDolphinExtensions := AllowDolphinExtensions. |
|
3019 |
allowLiteralNameSpaceSymbols := AllowLiteralNameSpaceSymbols. |
|
3020 |
allowExtendedBinarySelectors := AllowExtendedBinarySelectors. |
|
2306 | 3021 |
allowCaretAsBinop := AllowCaretAsBinop. |
1634 | 3022 |
allowFunctionCallSyntaxForBlockEvaluation := AllowFunctionCallSyntaxForBlockEvaluation. |
3023 |
allowLocalVariableDeclarationWithInitializerExpression := AllowLocalVariableDeclarationWithInitializerExpression. |
|
3024 |
allowDomainVariables := AllowDomainVariables. |
|
3025 |
allowArrayIndexSyntaxExtension := AllowArrayIndexSyntaxExtension. |
|
3026 |
allowReservedWordsAsSelectors := AllowReservedWordsAsSelectors. |
|
3027 |
allowVariableReferences := AllowVariableReferences. |
|
3028 |
allowLazyValueExtension := AllowLazyValueExtension. |
|
3029 |
allowFixedPointLiterals := AllowFixedPointLiterals. |
|
3030 |
allowExtendedSTXSyntax := AllowExtendedSTXSyntax. |
|
3031 |
allowQualifiedNames := AllowQualifiedNames. |
|
1655 | 3032 |
allowVisualAgeESSymbolLiterals := AllowVisualAgeESSymbolLiterals. |
1668 | 3033 |
allowExtensionsToPrivateClasses := AllowExtensionsToPrivateClasses. |
1689 | 3034 |
allowVisualAgePrimitives := AllowVisualAgePrimitives. |
3035 |
allowSqueakPrimitives := AllowSqueakPrimitives. |
|
1700 | 3036 |
allowSTVPrimitives := AllowSTVPrimitives. |
1702 | 3037 |
allowSTVExtensions := AllowSTVExtensions. |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3038 |
allowNationalCharactersInIdentifier := AllowNationalCharactersInIdentifier. |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3039 |
allowHashAsBinarySelector := AllowHashAsBinarySelector. |
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3040 |
allowSTXEOLComments := AllowSTXEOLComments. |
2984 | 3041 |
allowSTXDelimiterComments := AllowSTXDelimiterComments. |
3947 | 3042 |
allowSTXExtendedArrayLiterals := AllowSTXExtendedArrayLiterals. |
1773 | 3043 |
allowVisualWorksMethodAnnotations := AllowVisualWorksMethodAnnotations. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3044 |
allowPossibleSTCCompilationProblems := AllowPossibleSTCCompilationProblems. |
1950 | 3045 |
allowEmptyStatements := AllowEmptyStatements. |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3046 |
allowPeriodInSymbol := AllowPeriodInSymbol. |
2311 | 3047 |
"/ these are only supported in the new compiler |
2307 | 3048 |
allowUnicodeStrings := AllowUnicodeStrings. |
2310 | 3049 |
allowUnicodeCharacters := AllowUnicodeCharacters. |
2311 | 3050 |
allowCharacterEscapes := AllowCharacterEscapes. |
2313 | 3051 |
allowStringEscapes := AllowStringEscapes. |
2685 | 3052 |
allowAssignmentToBlockArgument := AllowAssignmentToBlockArgument. |
3053 |
allowAssignmentToMethodArgument := AllowAssignmentToMethodArgument. |
|
3054 |
allowAssignmentToPoolVariable := AllowAssignmentToPoolVariable. |
|
4085 | 3055 |
allowSignedByteArrayElements := AllowSignedByteArrayElements. |
4149 | 3056 |
allowSymbolsStartingWithDigit := AllowSymbolsStartingWithDigit. |
4185 | 3057 |
|
3058 |
allowJavaScriptConst := AllowJavaScriptConst. |
|
4149 | 3059 |
|
1634 | 3060 |
arraysAreImmutable := ArraysAreImmutable ? true. |
3061 |
stringsAreImmutable := StringsAreImmutable ? true. |
|
3062 |
implicitSelfSends := ImplicitSelfSends ? false. |
|
2929 | 3063 |
lineNumberInfo := LineNumberInfo ? false. |
1634 | 3064 |
|
1658 | 3065 |
stcKeepCIntermediate := STCKeepCIntermediate. |
3066 |
stcKeepOIntermediate := STCKeepOIntermediate. |
|
3067 |
stcKeepSTIntermediate := STCKeepSTIntermediate. |
|
3068 |
stcModulePath := STCModulePath. |
|
3069 |
stcCompilation := STCCompilation. |
|
3070 |
stcCompilationIncludes := STCCompilationIncludes. |
|
3071 |
stcCompilationDefines := STCCompilationDefines. |
|
3072 |
stcCompilationOptions := STCCompilationOptions. |
|
3073 |
stcPath := STCPath. |
|
3074 |
ccCompilationOptions := CCCompilationOptions. |
|
3075 |
ccPath := CCPath. |
|
3076 |
linkArgs := LinkArgs. |
|
3077 |
linkCommand := LinkCommand. |
|
3078 |
libPath := LibPath. |
|
3079 |
searchedLibraries := SearchedLibraries. |
|
3080 |
||
1634 | 3081 |
" |
3082 |
ParserFlags initialize. |
|
3083 |
self new inspect. |
|
3084 |
" |
|
1773 | 3085 |
|
4185 | 3086 |
"Modified: / 08-08-2017 / 23:50:01 / cg" |
1634 | 3087 |
! ! |
3088 |
||
3089 |
!ParserFlags class methodsFor:'documentation'! |
|
3090 |
||
3091 |
version |
|
3653 | 3092 |
^ '$Header$' |
2218
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
3093 |
! |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
3094 |
|
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
3095 |
version_CVS |
3653 | 3096 |
^ '$Header$' |
1634 | 3097 |
! ! |
3098 |
||
3009
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
3099 |
|
1634 | 3100 |
ParserFlags initialize! |