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