author | Claus Gittinger <cg@exept.de> |
Sun, 03 May 2020 23:44:59 +0200 | |
changeset 4650 | e9b212d470ff |
parent 4642 | 9aa51ff4afa1 |
child 4690 | 4d8edf5145b8 |
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 |
||
4640 | 872 |
" |
873 |
self allowCStrings |
|
874 |
" |
|
875 |
||
4333 | 876 |
"Created: / 08-02-2019 / 18:42:15 / Claus Gittinger" |
4412 | 877 |
"Modified (comment): / 23-05-2019 / 08:57:46 / Claus Gittinger" |
4333 | 878 |
! |
879 |
||
880 |
allowCStrings:aBoolean |
|
4412 | 881 |
"allow c-style strings of the form: |
882 |
c'...' containing c-language character escapes" |
|
883 |
||
4333 | 884 |
AllowCStrings := aBoolean. |
885 |
||
4335 | 886 |
" |
887 |
ParserFlags allowCStrings:true |
|
888 |
ParserFlags allowCStrings |
|
889 |
" |
|
890 |
||
4333 | 891 |
"Created: / 08-02-2019 / 18:42:30 / Claus Gittinger" |
4412 | 892 |
"Modified (comment): / 23-05-2019 / 08:57:50 / Claus Gittinger" |
4333 | 893 |
! |
894 |
||
4335 | 895 |
allowCaretAsBinop |
4412 | 896 |
"allow '^' to be used as a binary operator" |
897 |
||
4335 | 898 |
^ AllowCaretAsBinop |
899 |
||
900 |
"Created: / 08-02-2019 / 18:49:12 / Claus Gittinger" |
|
4412 | 901 |
"Modified (comment): / 23-05-2019 / 08:58:11 / Claus Gittinger" |
4335 | 902 |
! |
903 |
||
904 |
allowCaretAsBinop:aBoolean |
|
4412 | 905 |
"allow '^' to be used as a binary operator" |
906 |
||
4335 | 907 |
AllowCaretAsBinop := aBoolean |
908 |
||
909 |
"Created: / 08-02-2019 / 18:49:21 / Claus Gittinger" |
|
4412 | 910 |
"Modified (comment): / 23-05-2019 / 08:58:14 / Claus Gittinger" |
4335 | 911 |
! |
912 |
||
1634 | 913 |
allowDollarInIdentifier |
914 |
"return true, if $-characters are allowed in identifiers. |
|
4041 | 915 |
Notice, that dollars are NEVER allowed as the first character in an identifier |
4412 | 916 |
(because they are interpreted as character-constant then). |
917 |
Dollars in identifiers were used in VMS versions of VW-Smalltalk" |
|
1634 | 918 |
|
919 |
^ AllowDollarInIdentifier |
|
920 |
||
4041 | 921 |
"Created: / 07-09-1997 / 01:32:18 / cg" |
922 |
"Modified (comment): / 16-11-2016 / 22:25:59 / cg" |
|
4412 | 923 |
"Modified (comment): / 23-05-2019 / 08:59:03 / Claus Gittinger" |
1634 | 924 |
! |
925 |
||
926 |
allowDollarInIdentifier:aBoolean |
|
927 |
"this allows turning on/off $-characters in identifiers. |
|
928 |
Notice, that dollars are NEVER allowed as the first character in an identifier. |
|
929 |
If turned off (the default), dollars are not allowed in identifiers, |
|
930 |
but instead are scanned as character-constant prefix. |
|
4041 | 931 |
If turned on, dollars in identifiers are allowed, while extra |
1634 | 932 |
dollars are still scanned as constant character prefix. |
933 |
If you have to fileIn old VW-Vsn2.x classes, turn this off |
|
934 |
before filing them in; i.e.: |
|
4041 | 935 |
Compiler allowDollarInIdentifiers:false |
4412 | 936 |
Dollars in identifiers were used in VMS versions of VW-Smalltalk. |
4041 | 937 |
" |
1634 | 938 |
|
939 |
AllowDollarInIdentifier := aBoolean. |
|
940 |
||
4041 | 941 |
"Created: / 07-09-1997 / 01:34:49 / cg" |
942 |
"Modified (comment): / 16-11-2016 / 22:26:38 / cg" |
|
4412 | 943 |
"Modified (comment): / 23-05-2019 / 09:00:00 / Claus Gittinger" |
1634 | 944 |
! |
945 |
||
946 |
allowDolphinExtensions |
|
947 |
"return true, if ##(..) computed literals are allowed" |
|
948 |
||
949 |
^ AllowDolphinExtensions |
|
950 |
! |
|
951 |
||
952 |
allowDolphinExtensions:aBoolean |
|
953 |
"this allows turning on/off support for computed arrays ##(..) as in dolphin. |
|
954 |
If you want to fileIn Dolphin classes, enable this with: |
|
4256 | 955 |
Compiler allowDolphinComputedArrays:true" |
1634 | 956 |
|
957 |
AllowDolphinExtensions := aBoolean. |
|
958 |
||
959 |
" |
|
960 |
self allowDolphinExtensions:true |
|
961 |
self allowDolphinExtensions:false |
|
962 |
" |
|
963 |
! |
|
964 |
||
4412 | 965 |
allowEStrings |
966 |
"allow extended strings with embedded expressions of the form: |
|
967 |
e'...' containing c-language character escapes |
|
968 |
and embedded expressions {expr} which are sliced in" |
|
969 |
||
970 |
^ AllowEStrings |
|
971 |
||
4640 | 972 |
" |
973 |
self allowEStrings |
|
974 |
" |
|
975 |
||
4412 | 976 |
"Created: / 23-05-2019 / 10:28:17 / Claus Gittinger" |
977 |
! |
|
978 |
||
979 |
allowEStrings:aBoolean |
|
980 |
"allow extended strings with embedded expressions of the form: |
|
981 |
e'...' containing c-language character escapes |
|
982 |
and embedded expressions {expr} which are sliced in" |
|
983 |
||
984 |
AllowEStrings := aBoolean |
|
985 |
||
986 |
"Created: / 23-05-2019 / 10:28:29 / Claus Gittinger" |
|
987 |
! |
|
988 |
||
1950 | 989 |
allowEmptyStatements |
990 |
"return true, if empty statements are allowed (two .'s in a row). |
|
991 |
Notice, that stc cannot (yet) handle those." |
|
992 |
||
993 |
^ AllowEmptyStatements |
|
994 |
||
995 |
"Created: / 20-11-2006 / 14:29:02 / cg" |
|
996 |
! |
|
997 |
||
998 |
allowEmptyStatements:aBoolean |
|
999 |
"turn on/off, if empty statements are allowed (two .'s in a row). |
|
1000 |
Notice, that stc cannot (yet) handle those." |
|
1001 |
||
1002 |
AllowEmptyStatements := aBoolean |
|
1003 |
||
1004 |
"Created: / 20-11-2006 / 14:29:15 / cg" |
|
1005 |
! |
|
1006 |
||
2145 | 1007 |
allowExtendedBinarySelectors |
1008 |
"experimental extended selectors extensions" |
|
1009 |
||
4636 | 1010 |
^ AllowExtendedBinarySelectors ? false |
2218
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
1011 |
|
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
1012 |
" |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
1013 |
ParserFlags allowExtendedBinarySelectors |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
1014 |
ParserFlags allowExtendedBinarySelectors:false |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
1015 |
ParserFlags allowExtendedBinarySelectors:true |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
1016 |
" |
2145 | 1017 |
! |
1018 |
||
1019 |
allowExtendedBinarySelectors:aBoolean |
|
4413 | 1020 |
"experimental syntax extensions" |
2145 | 1021 |
|
1022 |
AllowExtendedBinarySelectors := aBoolean |
|
4413 | 1023 |
|
1024 |
"Modified (comment): / 23-05-2019 / 10:40:47 / Claus Gittinger" |
|
2145 | 1025 |
! |
1026 |
||
1682 | 1027 |
allowExtendedSTXSyntax |
4413 | 1028 |
"Enables ALL of the ST/X extensions. |
1029 |
Do not use for now, as stc does not support all of them" |
|
1682 | 1030 |
|
1031 |
^ AllowExtendedSTXSyntax |
|
4413 | 1032 |
|
1033 |
"Modified (comment): / 23-05-2019 / 10:41:53 / Claus Gittinger" |
|
1682 | 1034 |
! |
1035 |
||
1036 |
allowExtendedSTXSyntax:aBoolean |
|
4413 | 1037 |
"Enables ALL of the ST/X extensions. |
1038 |
Do not use for now, as stc does not support all of them" |
|
1682 | 1039 |
|
1040 |
AllowExtendedSTXSyntax := aBoolean |
|
1041 |
||
1042 |
" |
|
1043 |
self allowExtendedSTXSyntax:true |
|
1044 |
'a\tb' inspect. |
|
1045 |
'a\u1616b' inspect. |
|
3396 | 1046 |
self allowExtendedSTXSyntax:false |
1682 | 1047 |
" |
4413 | 1048 |
|
1049 |
"Modified (comment): / 23-05-2019 / 10:41:57 / Claus Gittinger" |
|
1682 | 1050 |
! |
1051 |
||
1677 | 1052 |
allowFixedPointLiterals |
4636 | 1053 |
"return true, if nnnsn (FixedPoint / ScaledDecimal) literals are allowed. |
4412 | 1054 |
The default is true." |
1677 | 1055 |
|
4636 | 1056 |
^ AllowFixedPointLiterals ? true |
4412 | 1057 |
|
1058 |
"Modified (comment): / 23-05-2019 / 09:00:40 / Claus Gittinger" |
|
1677 | 1059 |
! |
1060 |
||
1061 |
allowFixedPointLiterals:aBoolean |
|
4412 | 1062 |
"enable/disable, if nnnsn (FixedPoint) literals are allowed. |
1063 |
The default is true." |
|
1677 | 1064 |
|
1065 |
AllowFixedPointLiterals := aBoolean |
|
4412 | 1066 |
|
1067 |
"Modified (comment): / 23-05-2019 / 09:00:44 / Claus Gittinger" |
|
1677 | 1068 |
! |
1069 |
||
1634 | 1070 |
allowFunctionCallSyntaxForBlockEvaluation |
1071 |
"experimental" |
|
1072 |
||
1073 |
^ AllowFunctionCallSyntaxForBlockEvaluation |
|
1721 | 1074 |
|
1075 |
" |
|
1076 |
AllowFunctionCallSyntaxForBlockEvaluation := true |
|
1077 |
" |
|
1634 | 1078 |
! |
1079 |
||
1080 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean |
|
1081 |
"experimental" |
|
1082 |
||
1083 |
AllowFunctionCallSyntaxForBlockEvaluation := aBoolean. |
|
1084 |
! |
|
1085 |
||
4436 | 1086 |
allowGreekCharactersInIdentifier |
1087 |
"return true, if greek characters (alpha, beta etc.) are allowed in identifiers" |
|
1088 |
||
1089 |
^ AllowGreekCharactersInIdentifier |
|
1090 |
||
1091 |
"Created: / 08-06-2019 / 14:52:29 / Claus Gittinger" |
|
1092 |
! |
|
1093 |
||
1094 |
allowGreekCharactersInIdentifier:aBoolean |
|
1095 |
"are greek characters (alpha, beta etc.) are allowed in identifiers. |
|
1096 |
Use this ONLY to file in some non-ANSI ST code" |
|
1097 |
||
1098 |
AllowGreekCharactersInIdentifier := aBoolean |
|
1099 |
||
1100 |
"Created: / 08-06-2019 / 14:54:04 / Claus Gittinger" |
|
1101 |
! |
|
1102 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1103 |
allowHashAsBinarySelector |
4412 | 1104 |
"if true, a free-standing single '#' is allowed as a binary selector. |
1105 |
The default is true." |
|
1106 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1107 |
^ AllowHashAsBinarySelector |
4412 | 1108 |
|
1109 |
"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
|
1110 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1111 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1112 |
allowHashAsBinarySelector:aBoolean |
4412 | 1113 |
"if true, a free-standing single '#' is allowed as a binary selector. |
1114 |
The default is true." |
|
1115 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1116 |
AllowHashAsBinarySelector := aBoolean |
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 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1119 |
self allowHashAsBinarySelector:true |
3396 | 1120 |
self allowHashAsBinarySelector:false |
4412 | 1121 |
123 # 234 |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1122 |
" |
4412 | 1123 |
|
1124 |
"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
|
1125 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1126 |
|
4485 | 1127 |
allowInlineObjects |
1128 |
"return true, if inline objects are allowed" |
|
1129 |
||
1130 |
^ AllowInlineObjects |
|
1131 |
||
1132 |
"Created: / 08-08-2017 / 23:48:48 / cg" |
|
1133 |
! |
|
1134 |
||
1135 |
allowInlineObjects:aBoolean |
|
1136 |
"if true, inline objects are allowed" |
|
1137 |
||
1138 |
AllowInlineObjects := aBoolean |
|
1139 |
||
1140 |
"Created: / 08-08-2017 / 23:48:48 / cg" |
|
1141 |
! |
|
1142 |
||
4185 | 1143 |
allowJavaScriptConst |
1144 |
"return true, if const is allowed and treated as a keyword (in JavaScript)" |
|
1145 |
||
1146 |
^ AllowJavaScriptConst |
|
1147 |
||
1148 |
"Created: / 08-08-2017 / 23:48:48 / cg" |
|
1149 |
! |
|
1150 |
||
1151 |
allowJavaScriptConst:aBoolean |
|
1152 |
"true, if const is allowed and treated as a keyword (in JavaScript)" |
|
1153 |
||
1154 |
AllowJavaScriptConst := aBoolean |
|
1155 |
||
1156 |
"Created: / 08-08-2017 / 23:49:07 / cg" |
|
1157 |
! |
|
1158 |
||
4428 | 1159 |
allowLazyValueExtension |
1160 |
"allow !![...] to generate a lazy value" |
|
1161 |
||
1162 |
^ AllowLazyValueExtension |
|
1163 |
||
1164 |
"Created: / 03-06-2019 / 10:57:42 / Claus Gittinger" |
|
1165 |
! |
|
1166 |
||
1167 |
allowLazyValueExtension:aBoolean |
|
1168 |
"allow !![...] to generate a lazy value" |
|
1169 |
||
1170 |
AllowLazyValueExtension := aBoolean |
|
1171 |
||
1172 |
"Created: / 03-06-2019 / 10:57:50 / Claus Gittinger" |
|
1173 |
! |
|
1174 |
||
1634 | 1175 |
allowLiteralNameSpaceSymbols |
1176 |
"return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
|
1177 |
||
1178 |
^ AllowLiteralNameSpaceSymbols |
|
4412 | 1179 |
|
1180 |
" |
|
1181 |
#foo - ok |
|
1182 |
#foo::bar - ok |
|
1183 |
#foo.bar - not allowed |
|
1184 |
" |
|
1185 |
||
1186 |
"Modified (comment): / 23-05-2019 / 09:03:47 / Claus Gittinger" |
|
1634 | 1187 |
! |
1188 |
||
1189 |
allowLiteralNameSpaceSymbols:aBoolean |
|
1190 |
"controls, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
|
1191 |
||
1192 |
AllowLiteralNameSpaceSymbols := aBoolean |
|
4412 | 1193 |
|
1194 |
" |
|
1195 |
#foo - ok |
|
1196 |
#foo::bar - ok |
|
1197 |
#foo.bar - not allowed |
|
1198 |
" |
|
1199 |
||
1200 |
"Modified (comment): / 23-05-2019 / 09:03:43 / Claus Gittinger" |
|
1634 | 1201 |
! |
1202 |
||
1203 |
allowLocalVariableDeclarationWithInitializerExpression |
|
4301 | 1204 |
"experimental: | var := expr |" |
1634 | 1205 |
|
1206 |
^ AllowLocalVariableDeclarationWithInitializerExpression |
|
4301 | 1207 |
|
4412 | 1208 |
" |
1209 |
self allowLocalVariableDeclarationWithInitializerExpression:true |
|
1210 |
self allowLocalVariableDeclarationWithInitializerExpression:false |
|
1211 |
||
1212 |
|a := 0 . b := 1 | |
|
1213 |
Transcript showCR:'a is',a,' b is ',b |
|
1214 |
" |
|
1215 |
||
1216 |
"Modified (comment): / 23-05-2019 / 09:07:42 / Claus Gittinger" |
|
1634 | 1217 |
! |
1218 |
||
1219 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean |
|
4301 | 1220 |
"experimental: | var := expr |" |
1634 | 1221 |
|
1222 |
AllowLocalVariableDeclarationWithInitializerExpression := aBoolean. |
|
4301 | 1223 |
|
1224 |
"Modified (comment): / 23-09-2018 / 00:44:04 / Claus Gittinger" |
|
1634 | 1225 |
! |
1226 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1227 |
allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1228 |
"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
|
1229 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1230 |
^ AllowNationalCharactersInIdentifier |
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 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1233 |
allowNationalCharactersInIdentifier:aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1234 |
"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
|
1235 |
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
|
1236 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1237 |
AllowNationalCharactersInIdentifier := aBoolean |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1238 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1239 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1240 |
ParserFlags allowNationalCharactersInIdentifier:true |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1241 |
" |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1242 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
1243 |
|
1634 | 1244 |
allowOldStyleAssignment |
1245 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed" |
|
1246 |
||
1247 |
^ AllowOldStyleAssignment |
|
1248 |
! |
|
1249 |
||
1250 |
allowOldStyleAssignment:aBoolean |
|
1251 |
"this allows turning on/off recognition of underscore-assignment (pre ST-80v4 syntax). |
|
1252 |
You must turn this off, if code with variables named '_' is to be filedIn" |
|
1253 |
||
1254 |
AllowOldStyleAssignment := aBoolean |
|
1255 |
! |
|
1256 |
||
4041 | 1257 |
allowParagraphInIdentifier |
4406 | 1258 |
"return true, if §-characters are allowed in identifiers (treated as letter)" |
4041 | 1259 |
|
1260 |
^ AllowParagraphInIdentifier |
|
1261 |
||
1262 |
"Created: / 16-11-2016 / 22:24:32 / cg" |
|
1263 |
! |
|
1264 |
||
1265 |
allowParagraphInIdentifier:aBoolean |
|
4406 | 1266 |
"this allows turning on/off §-characters in identifiers." |
4041 | 1267 |
|
1268 |
AllowParagraphInIdentifier := aBoolean. |
|
1269 |
||
1270 |
"Created: / 16-11-2016 / 22:28:49 / cg" |
|
1271 |
! |
|
1272 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1273 |
allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1274 |
"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
|
1275 |
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
|
1276 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1277 |
^ AllowPeriodInSymbol |
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 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1280 |
allowPeriodInSymbol:aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1281 |
"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
|
1282 |
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
|
1283 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1284 |
AllowPeriodInSymbol := aBoolean |
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 |
" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1287 |
self allowPeriodInSymbol:true. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1288 |
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
|
1289 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1290 |
self allowPeriodInSymbol:false. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1291 |
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
|
1292 |
" |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1293 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1294 |
|
3576 | 1295 |
allowQualifiedNames |
4302 | 1296 |
"return true, if '#{..}' and 'namespace.varName' qualified names are allowed" |
3576 | 1297 |
|
1298 |
^ AllowQualifiedNames |
|
4302 | 1299 |
|
1300 |
"Modified (comment): / 23-09-2018 / 01:08:29 / Claus Gittinger" |
|
3576 | 1301 |
! |
1302 |
||
1303 |
allowQualifiedNames:aBoolean |
|
1304 |
"this allows turning on/off support for qualifiedNames #{ .., } as in vw3. |
|
1305 |
If you want to fileIn vw3 or later classes, enable this with: |
|
4256 | 1306 |
Compiler allowQualifiedNames:true |
3576 | 1307 |
Notice, that qualified names are not really supported semantically |
1308 |
(they are parsed, but treated like regular globals) |
|
1309 |
" |
|
1310 |
||
1311 |
AllowQualifiedNames := aBoolean. |
|
1312 |
||
1313 |
" |
|
1314 |
self allowQualifiedNames:true |
|
1315 |
self allowQualifiedNames:false |
|
1316 |
" |
|
1317 |
! |
|
1634 | 1318 |
|
4430 | 1319 |
allowRStrings |
1320 |
"rstrings have the syntax: |
|
1321 |
r'...' |
|
1322 |
which generates a regex" |
|
1323 |
||
1324 |
^ AllowRStrings |
|
1325 |
||
1326 |
"Created: / 03-06-2019 / 11:12:11 / Claus Gittinger" |
|
1327 |
! |
|
1328 |
||
1329 |
allowRStrings:aBoolean |
|
1330 |
"rstrings have the syntax: |
|
1331 |
r'...' |
|
1332 |
which generates a regex" |
|
1333 |
||
1334 |
AllowRStrings := aBoolean |
|
1335 |
||
1336 |
"Created: / 03-06-2019 / 11:12:37 / Claus Gittinger" |
|
1337 |
! |
|
1338 |
||
1634 | 1339 |
allowReservedWordsAsSelectors |
4449 | 1340 |
"if true, 'self', 'super', 'thisContext', 'nil', 'true' and 'false' are allowed |
1634 | 1341 |
as unary message selectors." |
1342 |
||
1343 |
^ AllowReservedWordsAsSelectors ? false |
|
4449 | 1344 |
|
1345 |
"Modified (format): / 25-06-2019 / 11:17:15 / Claus Gittinger" |
|
1634 | 1346 |
! |
1347 |
||
1348 |
allowReservedWordsAsSelectors:aBoolean |
|
4449 | 1349 |
"enable/disable, if 'self', 'super', 'thisContext', 'nil', 'true' and 'false' are to be allowed |
1634 | 1350 |
as unary message selectors." |
1351 |
||
1352 |
AllowReservedWordsAsSelectors := aBoolean. |
|
1353 |
||
1354 |
" |
|
1355 |
self allowReservedWordsAsSelectors:true |
|
1356 |
self allowReservedWordsAsSelectors:false |
|
1357 |
" |
|
4449 | 1358 |
|
1359 |
"Modified (comment): / 25-06-2019 / 11:18:13 / Claus Gittinger" |
|
1634 | 1360 |
! |
1361 |
||
1702 | 1362 |
allowSTVExtensions |
1363 |
"return true, if support for ST/V syntax extensions is enabled." |
|
1364 |
||
1365 |
^ AllowSTVExtensions |
|
1366 |
! |
|
1367 |
||
1368 |
allowSTVExtensions:aBoolean |
|
1369 |
"this allows turning on/off support for ST/V extensions: |
|
1370 |
If you want to fileIn ST/V classes, enable this with: |
|
4256 | 1371 |
Compiler allowSTVComputedArrays:true" |
1702 | 1372 |
|
1373 |
AllowSTVExtensions := aBoolean. |
|
1374 |
||
1375 |
" |
|
1704 | 1376 |
ParserFlags allowSTVExtensions:true |
1377 |
ParserFlags allowSTVExtensions:false |
|
1702 | 1378 |
" |
1379 |
! |
|
1380 |
||
1700 | 1381 |
allowSTVPrimitives |
1382 |
"return true, if support for ST/V primitives is enabled." |
|
1383 |
||
1384 |
^ AllowSTVPrimitives |
|
1385 |
! |
|
1386 |
||
1387 |
allowSTVPrimitives:aBoolean |
|
1388 |
"this allows turning on/off support for ST/V primitives" |
|
1389 |
||
1390 |
AllowSTVPrimitives := aBoolean |
|
1704 | 1391 |
|
1392 |
" |
|
1393 |
ParserFlags allowSTVPrimitives:true |
|
1394 |
" |
|
1700 | 1395 |
! |
1396 |
||
2984 | 1397 |
allowSTXDelimiterComments |
3455 | 1398 |
"token delimited comments; |
1399 |
these are multiline comments of the form: |
|
4174 | 1400 |
''>>TOKEN |
1401 |
... anything, including double quotes |
|
1402 |
TOKEN>>'' |
|
3455 | 1403 |
(the '' being a double quote in the above) |
1404 |
Such comments are especially useful to comment pieces of sample code, which may |
|
1405 |
contain another comment in it, but you don't want to make them all EOL comments |
|
1406 |
(which are an ST/X speciality also, by the way). |
|
1407 |
Be aware, that no other smalltalk supports this, so your code becomes harder to port, if you use it. |
|
1408 |
" |
|
1409 |
||
2984 | 1410 |
^ AllowSTXDelimiterComments |
4174 | 1411 |
|
1412 |
"Modified (comment): / 28-07-2017 / 10:32:54 / cg" |
|
2984 | 1413 |
! |
1414 |
||
1415 |
allowSTXDelimiterComments:aBoolean |
|
3455 | 1416 |
"enable token delimited comments; |
1417 |
these are multiline comments of the form: |
|
4256 | 1418 |
''>>TOKEN |
1419 |
... anything, including double quotes |
|
1420 |
TOKEN>>'' |
|
3455 | 1421 |
(the '' being a double quote in the above) |
1422 |
Such comments are especially useful to comment pieces of sample code, which may |
|
1423 |
contain another comment in it, but you don't want to make them all EOL comments |
|
1424 |
(which are an ST/X speciality also, by the way). |
|
1425 |
Be aware, that no other smalltalk supports this, so your code becomes harder to port, if you use it. |
|
1426 |
" |
|
1427 |
||
2984 | 1428 |
AllowSTXDelimiterComments := aBoolean. |
1429 |
||
1430 |
" |
|
1431 |
self allowSTXDelimiterComments:true |
|
1432 |
self allowSTXDelimiterComments:false |
|
1433 |
" |
|
1434 |
! |
|
1435 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1436 |
allowSTXEOLComments |
3946 | 1437 |
"are ST/X end-of-line comments allowed?" |
1438 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1439 |
^ AllowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1440 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1441 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1442 |
allowSTXEOLComments:aBoolean |
3946 | 1443 |
"are ST/X end-of-line comments allowed?" |
1444 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1445 |
AllowSTXEOLComments := aBoolean. |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1446 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1447 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1448 |
self allowSTXEOLComments:true |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1449 |
self allowSTXEOLComments:false |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1450 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1451 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
1452 |
|
3945 | 1453 |
allowSTXExtendedArrayLiterals |
3946 | 1454 |
"are scheme-style typed literal arrays allowed?" |
1455 |
||
3945 | 1456 |
^ AllowSTXExtendedArrayLiterals ? false |
1457 |
! |
|
1458 |
||
1459 |
allowSTXExtendedArrayLiterals:aBoolean |
|
3946 | 1460 |
"are scheme-style typed literal arrays allowed?" |
1461 |
||
3945 | 1462 |
AllowSTXExtendedArrayLiterals := aBoolean. |
1463 |
||
1464 |
" |
|
1465 |
self allowSTXExtendedArrayLiterals:true |
|
1466 |
self allowSTXExtendedArrayLiterals:false |
|
1467 |
" |
|
1468 |
! |
|
1469 |
||
4487 | 1470 |
allowSTXExtensions |
1471 |
"if false, support for ST/X extensions is generally disabled. |
|
1472 |
if true, individual control flags may apply" |
|
1473 |
||
1474 |
^ AllowSTXExtensions |
|
1475 |
! |
|
1476 |
||
1477 |
allowSTXExtensions:aBoolean |
|
1478 |
"if false, support for ST/X extensions is generally disabled. |
|
1479 |
if true, individual control flags may apply" |
|
1480 |
||
1481 |
AllowSTXExtensions := aBoolean |
|
1482 |
! |
|
1483 |
||
4085 | 1484 |
allowSignedByteArrayElements |
1485 |
"return true, if byteArray elements are allowed to be negative." |
|
1486 |
||
1487 |
^ AllowSignedByteArrayElements |
|
1488 |
! |
|
1489 |
||
1490 |
allowSignedByteArrayElements:aBoolean |
|
1491 |
"controls, if byteArray elements are allowed to be negative." |
|
1492 |
||
1493 |
AllowSignedByteArrayElements := aBoolean |
|
1494 |
! |
|
1495 |
||
3576 | 1496 |
allowSqueakExtensions |
1497 |
"return true, if support for squeak extensions |
|
4256 | 1498 |
computed arrays { .., } |
1499 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
3576 | 1500 |
is enabled." |
1501 |
||
1502 |
^ AllowSqueakExtensions |
|
1503 |
! |
|
1504 |
||
1505 |
allowSqueakExtensions:aBoolean |
|
1506 |
"this allows turning on/off support for squeak extensions: |
|
4256 | 1507 |
computed arrays { .., } |
1508 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
3576 | 1509 |
|
1510 |
If you want to fileIn Squeak classes, enable this with: |
|
4256 | 1511 |
Compiler allowSqueakComputedArrays:true" |
3576 | 1512 |
|
1513 |
AllowSqueakExtensions := aBoolean. |
|
1514 |
||
1515 |
" |
|
1516 |
self allowSqueakExtensions:true |
|
1517 |
self allowSqueakExtensions:false |
|
1518 |
" |
|
1519 |
! |
|
1634 | 1520 |
|
1689 | 1521 |
allowSqueakPrimitives |
1522 |
"return true, if support for squeak primitives is enabled." |
|
1523 |
||
1524 |
^ AllowSqueakPrimitives |
|
1525 |
! |
|
1526 |
||
1527 |
allowSqueakPrimitives:aBoolean |
|
1528 |
"this allows turning on/off support for squeak primitives" |
|
1529 |
||
1530 |
AllowSqueakPrimitives := aBoolean |
|
1531 |
! |
|
1532 |
||
4149 | 1533 |
allowSymbolsStartingWithDigit |
1534 |
"return true, if a symbol is allowed to start with a digit |
|
1535 |
i.e. as in #2D. |
|
1536 |
This seems to be ok in new Squeak/Pharo versions" |
|
1537 |
||
1538 |
^ AllowSymbolsStartingWithDigit |
|
1539 |
||
1540 |
"Created: / 18-06-2017 / 16:23:20 / cg" |
|
1541 |
! |
|
1542 |
||
1543 |
allowSymbolsStartingWithDigit:aBoolean |
|
1544 |
"controls if a symbol is allowed to start with a digit |
|
1545 |
i.e. as in #2D. |
|
1546 |
This seems to be ok in new Squeak/Pharo versions" |
|
1547 |
||
1548 |
AllowSymbolsStartingWithDigit := aBoolean |
|
1549 |
||
1550 |
"Created: / 18-06-2017 / 16:24:47 / cg" |
|
1551 |
! |
|
1552 |
||
1634 | 1553 |
allowUnderscoreInIdentifier |
1554 |
"return true, if underscores are allowed in identifiers" |
|
1555 |
||
1556 |
^ AllowUnderscoreInIdentifier |
|
1557 |
! |
|
1558 |
||
1559 |
allowUnderscoreInIdentifier:aBoolean |
|
1560 |
"this allows turning on/off underscores in identifiers. |
|
1561 |
If turned off (the default), underscores are not allowed in identifiers, |
|
1562 |
but instead scanned as assignment character (old ST/80 syntax). |
|
1563 |
If turned on, underscores are in identifiers are allowed, while extra |
|
1564 |
underscores are still scanned as assignment. |
|
3396 | 1565 |
If you have to fileIn old VW-Vsn2.x classes, |
1634 | 1566 |
turn them off with: |
4256 | 1567 |
Compiler allowUnderscoreInIdentifiers:false" |
1634 | 1568 |
|
1569 |
AllowUnderscoreInIdentifier := aBoolean. |
|
1570 |
||
1571 |
"Modified: 7.9.1997 / 01:35:19 / cg" |
|
1655 | 1572 |
! |
1573 |
||
2310 | 1574 |
allowUnicodeCharacters |
1575 |
^ AllowUnicodeCharacters |
|
1576 |
! |
|
1577 |
||
1578 |
allowUnicodeCharacters:aBoolean |
|
1579 |
AllowUnicodeCharacters := aBoolean. |
|
1580 |
! |
|
1581 |
||
2307 | 1582 |
allowUnicodeStrings |
1583 |
^ AllowUnicodeStrings |
|
1584 |
! |
|
1585 |
||
1586 |
allowUnicodeStrings:aBoolean |
|
1587 |
AllowUnicodeStrings := aBoolean. |
|
1588 |
! |
|
1589 |
||
1655 | 1590 |
allowVisualAgeESSymbolLiterals |
1591 |
"return true, if ##symbols are allowed (treated like symbols)" |
|
1592 |
||
1593 |
^ AllowVisualAgeESSymbolLiterals |
|
1594 |
! |
|
1595 |
||
1596 |
allowVisualAgeESSymbolLiterals:aBoolean |
|
1597 |
"if on, visualAge's ##symbols are allowed (treated like symbols)" |
|
1598 |
||
1599 |
AllowVisualAgeESSymbolLiterals := aBoolean. |
|
1689 | 1600 |
! |
1601 |
||
1602 |
allowVisualAgePrimitives |
|
1603 |
"return true, if support for V'Age primitives is enabled." |
|
1604 |
||
3396 | 1605 |
^ AllowVisualAgePrimitives |
2747 | 1606 |
|
1607 |
" |
|
1608 |
AllowVisualAgePrimitives := true |
|
1609 |
AllowVisualAgePrimitives := false |
|
1610 |
" |
|
1611 |
||
1612 |
"Modified (comment): / 18-10-2011 / 16:49:12 / cg" |
|
1689 | 1613 |
! |
1614 |
||
1615 |
allowVisualAgePrimitives:aBoolean |
|
1616 |
"this allows turning on/off support for V'Age primitives" |
|
1617 |
||
1618 |
AllowVisualAgePrimitives := aBoolean |
|
1773 | 1619 |
! |
1620 |
||
1621 |
allowVisualWorksMethodAnnotations |
|
1622 |
"return true, if support for V'Works extended primitive syntax for method annotations." |
|
1623 |
||
1624 |
^ AllowVisualWorksMethodAnnotations |
|
1625 |
||
1626 |
"Created: / 07-07-2006 / 15:49:32 / cg" |
|
1627 |
! |
|
1628 |
||
1629 |
allowVisualWorksMethodAnnotations:aBoolean |
|
1630 |
"turn on/off support for V'Works extended primitive syntax for method annotations." |
|
1631 |
||
1632 |
AllowVisualWorksMethodAnnotations := aBoolean |
|
1633 |
||
1634 |
"Created: / 07-07-2006 / 15:49:27 / cg" |
|
3220 | 1635 |
! |
1636 |
||
1637 |
warnAssignmentToBlockArgument |
|
1638 |
^ WarnAssignmentToBlockArgument |
|
1639 |
! |
|
1640 |
||
1641 |
warnAssignmentToBlockArgument:aBoolean |
|
1642 |
WarnAssignmentToBlockArgument := aBoolean |
|
1643 |
! |
|
1644 |
||
1645 |
warnAssignmentToMethodArgument |
|
1646 |
^ WarnAssignmentToMethodArgument |
|
1647 |
! |
|
1648 |
||
1649 |
warnAssignmentToMethodArgument:aBoolean |
|
1650 |
WarnAssignmentToMethodArgument := aBoolean |
|
1651 |
! |
|
1652 |
||
1653 |
warnAssignmentToPoolVariable |
|
1654 |
^ WarnAssignmentToPoolVariable |
|
1655 |
! |
|
1656 |
||
1657 |
warnAssignmentToPoolVariable:aBoolean |
|
1658 |
WarnAssignmentToPoolVariable := aBoolean |
|
1634 | 1659 |
! ! |
1660 |
||
1661 |
!ParserFlags class methodsFor:'accessing-warning-control'! |
|
1662 |
||
1652 | 1663 |
warnAboutBadComments |
1664 |
"controls generation of warning messages about empty comments" |
|
3396 | 1665 |
|
1652 | 1666 |
^ WarnAboutBadComments |
1667 |
! |
|
1668 |
||
1669 |
warnAboutBadComments:aBoolean |
|
1670 |
"controls generation of warning messages about empty comments" |
|
3396 | 1671 |
|
1652 | 1672 |
WarnAboutBadComments := aBoolean |
1673 |
! |
|
1674 |
||
1811 | 1675 |
warnAboutNonLowercaseLocalVariableNames |
1740 | 1676 |
"controls generation of warning messages about wrong variable names" |
3396 | 1677 |
|
1811 | 1678 |
^ WarnAboutNonLowercaseLocalVariableNames |
1740 | 1679 |
! |
1680 |
||
3396 | 1681 |
warnAboutNonLowercaseLocalVariableNames:aBoolean |
1740 | 1682 |
"controls generation of warning messages about wrong variable names" |
3396 | 1683 |
|
1811 | 1684 |
WarnAboutNonLowercaseLocalVariableNames := aBoolean |
1740 | 1685 |
! |
1686 |
||
3396 | 1687 |
warnAboutPeriodInSymbol |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1688 |
^ WarnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1689 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1690 |
|
3396 | 1691 |
warnAboutPeriodInSymbol:aBoolean |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1692 |
WarnAboutPeriodInSymbol := aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1693 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
1694 |
|
4461 | 1695 |
warnAboutPossibleNameClashes |
1696 |
^ WarnAboutPossibleNameClashes |
|
1697 |
||
1698 |
"Created: / 16-11-2006 / 14:31:52 / cg" |
|
1699 |
! |
|
1700 |
||
1701 |
warnAboutPossibleNameClashes:aBoolean |
|
1702 |
WarnAboutPossibleNameClashes := aBoolean |
|
1703 |
||
1704 |
"Created: / 16-11-2006 / 14:31:57 / cg" |
|
1705 |
! |
|
1706 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1707 |
warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1708 |
^ WarnAboutPossibleSTCCompilationProblems |
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 |
"Created: / 16-11-2006 / 14:31:52 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1711 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1712 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1713 |
warnAboutPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1714 |
WarnAboutPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1715 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1716 |
"Created: / 16-11-2006 / 14:31:57 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1717 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
1718 |
|
2121 | 1719 |
warnAboutPossiblyUnimplementedSelectors |
1720 |
^ WarnAboutPossiblyUnimplementedSelectors |
|
1721 |
! |
|
1722 |
||
1723 |
warnAboutPossiblyUnimplementedSelectors:aBoolean |
|
1724 |
WarnAboutPossiblyUnimplementedSelectors := aBoolean |
|
1725 |
! |
|
1726 |
||
4406 | 1727 |
warnAboutPossiblyUninitializedLocals |
1728 |
^ WarnAboutPossiblyUninitializedLocals |
|
1729 |
||
1730 |
"Created: / 23-04-2019 / 23:09:08 / Claus Gittinger" |
|
1731 |
! |
|
1732 |
||
1733 |
warnAboutPossiblyUninitializedLocals:aBoolean |
|
1734 |
WarnAboutPossiblyUninitializedLocals := aBoolean |
|
1735 |
||
1736 |
"Created: / 23-04-2019 / 23:09:20 / Claus Gittinger" |
|
1737 |
! |
|
1738 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1739 |
warnAboutReferenceToPrivateClass |
3396 | 1740 |
"controls generation of warning messages when a private class is referenced" |
1741 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1742 |
^ WarnAboutReferenceToPrivateClass |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1743 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1744 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1745 |
warnAboutReferenceToPrivateClass:aBoolean |
3396 | 1746 |
"controls generation of warning messages when a private class is referenced" |
1747 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1748 |
WarnAboutReferenceToPrivateClass := aBoolean |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1749 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
1750 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1751 |
warnAboutShortLocalVariableNames |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1752 |
"controls generation of warning messages about short variable names" |
3396 | 1753 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1754 |
^ WarnAboutShortLocalVariableNames |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1755 |
! |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1756 |
|
3396 | 1757 |
warnAboutShortLocalVariableNames:aBoolean |
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1758 |
"controls generation of warning messages about short variable names" |
3396 | 1759 |
|
2081
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1760 |
WarnAboutShortLocalVariableNames := aBoolean |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1761 |
! |
a8b56888f91c
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2079
diff
changeset
|
1762 |
|
2739 | 1763 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1764 |
"things like '\c:foo' instead of '\\c:foo' " |
|
3396 | 1765 |
|
2739 | 1766 |
^ WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1767 |
||
1768 |
"Created: / 04-10-2011 / 19:54:57 / cg" |
|
1769 |
! |
|
1770 |
||
1771 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean |
|
1772 |
"things like '\c:foo' instead of '\\c:foo' " |
|
3396 | 1773 |
|
2739 | 1774 |
WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean |
1775 |
||
1776 |
"Created: / 04-10-2011 / 19:54:42 / cg" |
|
1777 |
! |
|
1778 |
||
3396 | 1779 |
warnAboutVariableNameConventions |
1634 | 1780 |
"controls generation of warning messages about wrong variable names" |
3396 | 1781 |
|
1634 | 1782 |
^ WarnAboutVariableNameConventions |
1783 |
! |
|
1784 |
||
3396 | 1785 |
warnAboutVariableNameConventions:aBoolean |
1634 | 1786 |
"controls generation of warning messages about wrong variable names" |
3396 | 1787 |
|
1634 | 1788 |
WarnAboutVariableNameConventions := aBoolean |
1789 |
! |
|
1790 |
||
1791 |
warnAboutWrongVariableNames |
|
1792 |
"controls generation of warning messages about wrong variable names" |
|
3396 | 1793 |
|
1634 | 1794 |
^ WarnAboutWrongVariableNames |
1795 |
! |
|
1796 |
||
1797 |
warnAboutWrongVariableNames:aBoolean |
|
1798 |
"controls generation of warning messages about wrong variable names" |
|
3396 | 1799 |
|
1634 | 1800 |
WarnAboutWrongVariableNames := aBoolean |
1801 |
! |
|
1802 |
||
1803 |
warnCommonMistakes |
|
1804 |
"return true, if common beginners mistakes are to be warned about" |
|
1805 |
||
1754 | 1806 |
^ WarnCommonMistakes |
1634 | 1807 |
! |
1808 |
||
1809 |
warnCommonMistakes:aBoolean |
|
1810 |
"this allows turning on/off warnings about common beginners mistakes. |
|
1811 |
Those are not really errors in the strict sense, but often lead to |
|
1812 |
run time errors later. |
|
1813 |
Examples are: expr or:expr2, where expr2 is not a block. |
|
1814 |
If you get bored by those warnings, turn them off by adding |
|
1815 |
a line as: |
|
4256 | 1816 |
ParserFlags warnCommonMistakes:false |
1634 | 1817 |
in your 'private.rc' file" |
1818 |
||
1819 |
WarnCommonMistakes := aBoolean |
|
1902 | 1820 |
|
1821 |
"Modified: / 05-09-2006 / 11:46:26 / cg" |
|
1634 | 1822 |
! |
1823 |
||
1824 |
warnDollarInIdentifier |
|
1825 |
"return true, if $-characters in identifiers are to be warned about" |
|
1826 |
||
1827 |
^ Warnings and:[WarnDollarInIdentifier] |
|
1828 |
||
1829 |
"Created: 7.9.1997 / 01:36:17 / cg" |
|
1830 |
! |
|
1831 |
||
1832 |
warnDollarInIdentifier:aBoolean |
|
1833 |
"this allows turning on/off warnings about $-characters in identifiers. |
|
1834 |
You may find those warnings useful, to make certain that your code |
|
4041 | 1835 |
is portable to other Smalltalk versions, which do not allow this |
1634 | 1836 |
(i.e. VW releases 2.x and maybe others). |
1837 |
Notice, that dollars are NEVER allowed as the first character in an identifier. |
|
1838 |
If you get bored by those warnings, turn them off by adding |
|
1839 |
a line as: |
|
4041 | 1840 |
ParserFlags warnDollarInIdentifier:false |
1634 | 1841 |
in your 'private.rc' file" |
1842 |
||
1843 |
WarnDollarInIdentifier := aBoolean |
|
1844 |
||
1902 | 1845 |
"Created: / 07-09-1997 / 01:37:42 / cg" |
1846 |
"Modified: / 05-09-2006 / 11:46:23 / cg" |
|
4041 | 1847 |
"Modified (comment): / 16-11-2016 / 22:31:06 / cg" |
1634 | 1848 |
! |
1849 |
||
1682 | 1850 |
warnHiddenVariables |
1851 |
"controls generation of warning messages about hiding variables by locals" |
|
3396 | 1852 |
|
1682 | 1853 |
^ WarnHiddenVariables |
1854 |
! |
|
1855 |
||
1856 |
warnHiddenVariables:aBoolean |
|
1857 |
"controls generation of warning messages about hiding variables by locals" |
|
1858 |
||
1859 |
WarnHiddenVariables := aBoolean |
|
1860 |
! |
|
1861 |
||
1862 |
warnInconsistentReturnValues |
|
1863 |
"return true, if compiler should warn about inconsitent (boolean / non-boolean) |
|
1864 |
return values" |
|
1865 |
||
1866 |
^ WarnInconsistentReturnValues |
|
1867 |
! |
|
1868 |
||
1869 |
warnInconsistentReturnValues:aBoolean |
|
1870 |
"constrols if the compiler should warn about inconsitent (boolean / non-boolean) |
|
1871 |
return values" |
|
1872 |
||
1873 |
WarnInconsistentReturnValues := aBoolean |
|
1874 |
! |
|
1875 |
||
1634 | 1876 |
warnOldStyleAssignment |
1877 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be warned about" |
|
1878 |
||
1879 |
^ Warnings and:[WarnOldStyleAssignment] |
|
1880 |
! |
|
1881 |
||
1882 |
warnOldStyleAssignment:aBoolean |
|
1883 |
"this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax). |
|
1884 |
If you get bored by those warnings, turn them off by adding |
|
1885 |
a line as: |
|
4256 | 1886 |
ParserFlags warnOldStyleAssignment:false |
1634 | 1887 |
in your 'private.rc' file" |
1888 |
||
1889 |
WarnOldStyleAssignment := aBoolean |
|
1902 | 1890 |
|
1891 |
"Modified: / 05-09-2006 / 11:46:17 / cg" |
|
1634 | 1892 |
! |
1893 |
||
4041 | 1894 |
warnParagraphInIdentifier |
4406 | 1895 |
"return true, if §-characters in identifiers are to be warned about" |
4041 | 1896 |
|
1897 |
^ Warnings and:[WarnParagraphInIdentifier] |
|
1898 |
||
1899 |
"Created: / 16-11-2016 / 22:30:01 / cg" |
|
1900 |
! |
|
1901 |
||
1902 |
warnParagraphInIdentifier:aBoolean |
|
4406 | 1903 |
"this allows turning on/off warnings about §-characters in identifiers. |
4041 | 1904 |
You may find those warnings useful, to make certain that your code |
1905 |
is portable to other Smalltalk versions, which do not allow this" |
|
1906 |
||
1907 |
WarnParagraphInIdentifier := aBoolean |
|
1908 |
||
1909 |
"Created: / 16-11-2016 / 22:30:45 / cg" |
|
1910 |
! |
|
1911 |
||
2787 | 1912 |
warnPlausibilityChecks |
1913 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
1914 |
||
1915 |
^ WarnPlausibilityChecks |
|
1916 |
||
1917 |
"Created: / 19-01-2012 / 10:38:20 / cg" |
|
1918 |
! |
|
1919 |
||
1920 |
warnPlausibilityChecks:aBoolean |
|
1921 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
1922 |
||
1923 |
WarnPlausibilityChecks := aBoolean |
|
1924 |
||
1925 |
"Created: / 19-01-2012 / 10:38:39 / cg" |
|
1926 |
! |
|
1927 |
||
1634 | 1928 |
warnPossibleIncompatibilities |
1929 |
"return true, if possible incompatibilities (with other ST systems) |
|
1930 |
are to be warned about" |
|
1931 |
||
1932 |
^ Warnings and:[WarnPossibleIncompatibilities] |
|
1933 |
||
1934 |
"Modified: 23.5.1997 / 12:02:02 / cg" |
|
1935 |
! |
|
1936 |
||
1937 |
warnPossibleIncompatibilities:aBoolean |
|
1938 |
"this turns warnings about possible incompatibilities (with other ST systems) |
|
1939 |
on or off. |
|
1940 |
If you get bored by those warnings, turn them off by adding |
|
1941 |
a line as: |
|
4256 | 1942 |
ParserFlags warnPossibleIncompatibilities:false |
1634 | 1943 |
in your 'private.rc' file." |
1944 |
||
1945 |
WarnPossibleIncompatibilities := aBoolean |
|
1946 |
||
1902 | 1947 |
"Created: / 23-05-1997 / 12:02:45 / cg" |
1948 |
"Modified: / 05-09-2006 / 11:46:14 / cg" |
|
1634 | 1949 |
! |
1950 |
||
1951 |
warnSTXSpecials |
|
1952 |
"return true, if ST/X specials are to be warned about" |
|
1953 |
||
1954 |
^ Warnings and:[WarnSTXSpecials] |
|
1955 |
! |
|
1956 |
||
1957 |
warnSTXSpecials:aBoolean |
|
1958 |
"this allows turning on/off warnings about stx specials. |
|
1959 |
If you get bored by those warnings, turn them off by adding |
|
1960 |
a line as: |
|
4256 | 1961 |
ParserFlags warnSTXSpecials:false |
1634 | 1962 |
in your 'private.rc' file" |
1963 |
||
1964 |
WarnSTXSpecials := aBoolean |
|
1902 | 1965 |
|
1966 |
"Modified: / 05-09-2006 / 11:46:11 / cg" |
|
1634 | 1967 |
! |
1968 |
||
1969 |
warnUnderscoreInIdentifier |
|
1970 |
"return true, if underscores in identifiers are to be warned about" |
|
1971 |
||
1972 |
^ Warnings and:[WarnUnderscoreInIdentifier] |
|
1973 |
! |
|
1974 |
||
1975 |
warnUnderscoreInIdentifier:aBoolean |
|
1976 |
"this allows turning on/off warnings about underscores in identifiers. |
|
1977 |
You may find those warnings useful, to make certain that your code |
|
1978 |
is portable to other smalltalk versions, which do not allow this |
|
1979 |
(i.e. VW releases 2.x). |
|
1980 |
If you get bored by those warnings, turn them off by adding |
|
1981 |
a line as: |
|
4256 | 1982 |
ParserFlags warnUnderscoreInIdentifier:false |
1634 | 1983 |
in your 'private.rc' file" |
1984 |
||
1985 |
WarnUnderscoreInIdentifier := aBoolean |
|
1986 |
||
1902 | 1987 |
"Modified: / 05-09-2006 / 11:46:08 / cg" |
1634 | 1988 |
! |
1989 |
||
1990 |
warnUnusedVars |
|
1991 |
"controls generation of warning messages about unued method variables" |
|
1992 |
||
1993 |
^ WarnUnusedVars |
|
1994 |
! |
|
1995 |
||
1996 |
warnUnusedVars:aBoolean |
|
1997 |
"controls generation of warning messages about unued method variables" |
|
1998 |
||
1999 |
WarnUnusedVars := aBoolean |
|
2000 |
! |
|
2001 |
||
2002 |
warnings |
|
2003 |
"return true, if any warnings are to be shown" |
|
2004 |
||
2005 |
^ Warnings |
|
2006 |
! |
|
2007 |
||
2008 |
warnings:aBoolean |
|
2009 |
"this allows turning on/off all warnings; the default is on. |
|
2010 |
You can turn off warnings in your 'private.rc' file with |
|
4256 | 2011 |
ParserFlags warnings:false |
1634 | 2012 |
" |
2013 |
||
2014 |
Warnings := aBoolean |
|
2015 |
||
1902 | 2016 |
" |
2017 |
ParserFlags warnings |
|
2018 |
ParserFlags warnings:true |
|
2019 |
ParserFlags warnings:false |
|
2020 |
" |
|
2021 |
||
2022 |
"Modified: / 05-09-2006 / 11:46:47 / cg" |
|
1634 | 2023 |
! ! |
2024 |
||
2025 |
!ParserFlags class methodsFor:'class initialization'! |
|
2026 |
||
3576 | 2027 |
initialize |
4017 | 2028 |
|executablePath topDir| |
3576 | 2029 |
|
4421 | 2030 |
SinglePrecisionFloatF := false. |
2031 |
||
3576 | 2032 |
Warnings := true. |
2033 |
WarnUndeclared := true. |
|
2034 |
WarnUnusedVars := true. |
|
2035 |
WarnSTXSpecials := false. |
|
2036 |
WarnST80Directives := false. |
|
2037 |
WarnAboutWrongVariableNames := true. |
|
2038 |
WarnAboutVariableNameConventions := true. |
|
2039 |
WarnAboutBadComments := true. |
|
4406 | 2040 |
WarnAboutPossiblyUninitializedLocals := true. |
3576 | 2041 |
WarnUnderscoreInIdentifier := false. |
2042 |
WarnDollarInIdentifier := true. |
|
4041 | 2043 |
WarnParagraphInIdentifier := true. |
3576 | 2044 |
WarnOldStyleAssignment := true. |
2045 |
WarnCommonMistakes := true. |
|
2046 |
WarnPossibleIncompatibilities := false. |
|
2047 |
WarnHiddenVariables := true. |
|
2048 |
WarnInconsistentReturnValues := true. |
|
2049 |
WarnAboutNonLowercaseLocalVariableNames := true. |
|
2050 |
WarnAboutShortLocalVariableNames := false. |
|
2051 |
WarnAboutPossibleSTCCompilationProblems := true. |
|
4461 | 2052 |
WarnAboutPossibleNameClashes := true. |
3576 | 2053 |
WarnAboutReferenceToPrivateClass := true. |
2054 |
WarnAboutPossiblyUnimplementedSelectors := true. |
|
2055 |
WarnAboutPeriodInSymbol := true. |
|
2056 |
WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := false. |
|
2057 |
WarnPlausibilityChecks := true. |
|
2058 |
WarnAssignmentToBlockArgument := true. |
|
2059 |
WarnAssignmentToMethodArgument := true. |
|
2060 |
WarnAssignmentToPoolVariable := true. |
|
2061 |
||
4487 | 2062 |
AllowSTXExtensions := true. |
3576 | 2063 |
AllowReservedWordsAsSelectors := false. |
2064 |
AllowUnderscoreInIdentifier := true. |
|
4041 | 2065 |
AllowParagraphInIdentifier := false. |
3576 | 2066 |
AllowDollarInIdentifier := false. "/ st80-vms dollars in identifiers |
2067 |
AllowOldStyleAssignment := true. "/ st80 underscore as assignment |
|
2068 |
AllowDolphinExtensions := false. "/ dolphin computed literal |
|
2069 |
AllowQualifiedNames := false. "/ vw3 qualified names |
|
2070 |
AllowExtendedBinarySelectors := false. "/ vw5.4 extended binary selectors (plus/minus, center-dot etc.) |
|
2071 |
AllowCaretAsBinop := false. "/ too dangerous |
|
2072 |
AllowLiteralNameSpaceSymbols := true. "/ st/x literal nameSpace-symbols (#foo::bar) |
|
4502 | 2073 |
AllowArrayIndexSyntaxExtension := true. |
3576 | 2074 |
AllowFunctionCallSyntaxForBlockEvaluation := false. |
2075 |
AllowLocalVariableDeclarationWithInitializerExpression := false. |
|
2076 |
AllowDomainVariables := false. |
|
2077 |
AllowReservedWordsAsSelectors := true. |
|
2078 |
AllowVariableReferences := false. |
|
2079 |
AllowLazyValueExtension := false. |
|
2080 |
AllowFixedPointLiterals := true "false". |
|
2081 |
AllowExtendedSTXSyntax := false. |
|
2082 |
AllowVisualAgeESSymbolLiterals := false. |
|
2083 |
AllowExtensionsToPrivateClasses := true. |
|
2084 |
AllowVisualAgePrimitives := false. |
|
2085 |
AllowSqueakExtensions := true. "/ squeak computed array |
|
2086 |
AllowSqueakPrimitives := false. |
|
2087 |
AllowSTVPrimitives := false. "/ number-sign syntax |
|
2088 |
AllowSTVExtensions := false. |
|
2089 |
AllowNationalCharactersInIdentifier := false. |
|
4436 | 2090 |
AllowGreekCharactersInIdentifier := false. |
3576 | 2091 |
AllowHashAsBinarySelector := true. |
2092 |
AllowSTXEOLComments := true. |
|
2093 |
AllowSTXDelimiterComments := true. "/ until stc and RBScanner support it also |
|
2094 |
AllowVisualWorksMethodAnnotations := false. |
|
2095 |
AllowPossibleSTCCompilationProblems := true. "/ must be true, to allow fileIn!! |
|
2096 |
AllowEmptyStatements := false. |
|
2097 |
AllowPeriodInSymbol := false. |
|
4301 | 2098 |
AllowPeriodAsNameSpaceSeparator := false. |
4483 | 2099 |
|
3576 | 2100 |
"/ these are only used by the new compiler |
4488 | 2101 |
AllowSTXExtendedArrayLiterals := true. "/ #u16(...) |
4478 | 2102 |
AllowCIntegers := true. "/ 0xXXX, 0bBBB and 0oOOO syntax |
4488 | 2103 |
AllowCStrings := true. "/ c'...' syntax (c-language escapes) |
4640 | 2104 |
AllowEStrings := true. "/ e'...' syntax (embedded args strings) |
4642 | 2105 |
AllowRStrings := true. "/ r'...' syntax (regex strings) |
3576 | 2106 |
AllowUnicodeStrings := false. |
2107 |
AllowUnicodeCharacters := false. |
|
2108 |
AllowCharacterEscapes := false. |
|
2109 |
AllowStringEscapes := false. |
|
2110 |
AllowAssignmentToBlockArgument := false. |
|
2111 |
AllowAssignmentToMethodArgument := false. |
|
2112 |
AllowAssignmentToPoolVariable := false. |
|
2113 |
"/ AllowAssignmentToPoolVariable := true. |
|
4085 | 2114 |
AllowSignedByteArrayElements := false. |
4149 | 2115 |
AllowSymbolsStartingWithDigit := false. |
4485 | 2116 |
AllowInlineObjects := false. "/ { keyword: value . ... } and #{ keyword: value ... } |
4185 | 2117 |
|
2118 |
AllowJavaScriptConst := true. |
|
4149 | 2119 |
|
3576 | 2120 |
ArraysAreImmutable := false. "/ still care for ST-80 compatibility |
2121 |
StringsAreImmutable := false. "/ still care for ST-80 compatibility |
|
2122 |
"/ ArraysAreImmutable := true. "/ do not care for ST-80 compatibility |
|
2123 |
"/ StringsAreImmutable := true. "/ do not care for ST-80 compatibility |
|
2124 |
ImplicitSelfSends := false. |
|
4050 | 2125 |
|
3576 | 2126 |
STCKeepCIntermediate := false. |
2127 |
STCKeepOIntermediate := false. |
|
2128 |
STCKeepSTIntermediate := false. |
|
2129 |
STCCompilation := #default. |
|
2130 |
||
2131 |
DefineForBorlandC := '__BORLANDC__'. |
|
2132 |
DefineForVisualC := '__VISUALC__'. |
|
2133 |
DefineForMSC := '__MSC__'. |
|
4255 | 2134 |
"/ https://expeccoalm.exept.de/D252306 |
2135 |
"/ must not redefine __GNUC__, because gcc defines this anyway with the gcc version |
|
2136 |
"/ contained in this macro (which is used by glibc includes). |
|
2137 |
"/ also defined in STCCompilerInterface class >> #getCCDefine |
|
2138 |
DefineForGNUC := 'STX__GNUC__'. |
|
3576 | 2139 |
DefineForMINGW := '__MINGW__'. |
2140 |
DefineForMINGW32 := '__MINGW32__'. |
|
2141 |
DefineForMINGW64 := '__MINGW64__'. |
|
3945 | 2142 |
DefineForCLANG := '__CLANG__'. |
3576 | 2143 |
|
4017 | 2144 |
"/ try along the executable's path itself |
3576 | 2145 |
(executablePath := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[ |
4017 | 2146 |
|parentDir| |
2147 |
||
2148 |
parentDir := executablePath asFilename directory. |
|
2149 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
2150 |
topDir := parentDir. |
|
2151 |
] ifFalse:[ |
|
2152 |
parentDir := parentDir directory. |
|
2153 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
2154 |
topDir := parentDir. |
|
2155 |
] ifFalse:[ |
|
2156 |
parentDir := parentDir directory. |
|
2157 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
2158 |
topDir := parentDir. |
|
2159 |
] |
|
2160 |
] |
|
2161 |
]. |
|
2162 |
]. |
|
2163 |
||
2164 |
topDir isNil ifTrue:[ |
|
4048 | 2165 |
"/ try standard installation paths... |
4017 | 2166 |
OperatingSystem isOSXlike ifTrue:[ |
2167 |
|appDir parentDir| |
|
2168 |
||
2169 |
(appDir := '/Applications/SmalltalkX.app' asFilename) 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 |
(appDir := Filename homeDirectory / 'Applications/SmalltalkX.app') exists ifTrue:[ |
|
2177 |
(parentDir := appDir / 'Packages/stx') exists ifTrue:[ |
|
2178 |
((parentDir / 'include') exists and:[(parentDir / 'stc') exists]) ifTrue:[ |
|
2179 |
topDir := parentDir. |
|
2180 |
]. |
|
2181 |
]. |
|
2182 |
]. |
|
2183 |
]. |
|
2184 |
]. |
|
2185 |
||
2186 |
topDir notNil ifTrue:[ |
|
2187 |
self initializeSTCFlagsForTopDirectory:topDir. |
|
3576 | 2188 |
]. |
2189 |
||
2190 |
" |
|
2191 |
ParserFlags initialize |
|
2192 |
" |
|
2193 |
||
2194 |
"Modified: / 09-08-2006 / 18:47:18 / fm" |
|
4185 | 2195 |
"Modified: / 08-08-2017 / 23:49:41 / cg" |
4255 | 2196 |
"Modified (comment): / 11-05-2018 / 10:12:29 / stefan" |
4436 | 2197 |
"Modified: / 08-06-2019 / 14:53:27 / Claus Gittinger" |
3576 | 2198 |
! |
2199 |
||
2200 |
initializeSTCFlagsForTopDirectory:topDirArg |
|
2201 |
"topDirArg must be the stx directory (where stc directory with stc-executable is found) |
|
2202 |
notice: for now, can only initialize for borland+windows or linux; |
|
2203 |
visualC setup still fails." |
|
2204 |
||
3719 | 2205 |
|topDir topDirName vcTop sdkTop bccTop mingwTop |
3945 | 2206 |
borlandDir useBorlandC useVisualC useMingw32 useMingw64 |
4256 | 2207 |
programFiles archArg picArg optArg| |
3576 | 2208 |
|
2209 |
topDir := topDirArg. |
|
2210 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
3960 | 2211 |
topDirArg isString ifTrue:[ |
2212 |
topDir := topDirArg copyReplaceAll:$/ with:$\ ifNone:topDirArg. |
|
2213 |
] |
|
3576 | 2214 |
]. |
2215 |
topDir := topDir asFilename. |
|
2216 |
topDirName := topDir name. |
|
2217 |
||
2218 |
"/ if in the development directory, use ./modules |
|
2219 |
Smalltalk isSmalltalkDevelopmentSystem ifTrue:[ |
|
4017 | 2220 |
STCModulePath := UserPreferences current workspaceDirectory / 'modules'. |
3576 | 2221 |
] ifFalse:[ |
4017 | 2222 |
STCModulePath := Filename tempDirectory / 'modules'. |
3576 | 2223 |
]. |
2224 |
||
2225 |
(topDir construct:'stc') exists ifFalse:[ |
|
3960 | 2226 |
('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR. |
2227 |
'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR. |
|
2228 |
STCCompilation := #never. |
|
3576 | 2229 |
]. |
2230 |
||
2231 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
3960 | 2232 |
useBorlandC := useVisualC := useMingw32 := useMingw64 := false. |
2233 |
programFiles := OperatingSystem getEnvironment:'ProgramFiles'. |
|
2234 |
programFiles isEmptyOrNil ifTrue:[ programFiles := 'C:\Program Files' ]. |
|
2235 |
||
2236 |
STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'. |
|
2237 |
||
4252 | 2238 |
ExternalBytes sizeofPointer == 4 ifFalse:[ |
3960 | 2239 |
bccTop := nil |
2240 |
] ifTrue:[ |
|
2241 |
(bccTop := BCCTop) isNil ifTrue:[ |
|
2242 |
borlandDir := OperatingSystem getEnvironment:'BCCDIR'. |
|
2243 |
borlandDir isEmptyOrNil ifTrue:[ borlandDir := 'C:\Borland\bcc55' ]. |
|
2244 |
bccTop := { |
|
2245 |
(borlandDir) . |
|
2246 |
(programFiles , '\Borland\bcc55') . |
|
2247 |
(programFiles , '\bcc55') . |
|
2248 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] |
|
2249 |
ifNone:nil. |
|
2250 |
]. |
|
2251 |
]. |
|
2252 |
||
2253 |
STCCompilationDefines := '-DWIN32'. |
|
2254 |
||
2255 |
(bccTop notNil and:[bccTop asFilename exists]) ifTrue:[ |
|
2256 |
STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'. |
|
2257 |
LibDirectory := topDirName,'\lib\bc'. |
|
2258 |
LinkArgs := '-L',topDirName,'\lib\bc'. |
|
2259 |
LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'. |
|
2260 |
CCPath := 'bcc32'. |
|
2261 |
MakeCommand := 'bmake'. |
|
2262 |
LinkCommand := 'ilink32'. |
|
2263 |
CCCompilationOptions := '-w-'. |
|
2264 |
useBorlandC := true. |
|
2265 |
] ifFalse:[ |
|
4252 | 2266 |
ExternalBytes sizeofPointer == 4 ifFalse:[ |
3960 | 2267 |
vcTop := nil. |
2268 |
] ifTrue:[ |
|
2269 |
(vcTop := VCTop) isNil ifTrue:[ |
|
2270 |
vcTop := { |
|
2271 |
(programFiles,'\Microsoft Visual Studio 13.0\VC') . |
|
2272 |
(programFiles,'\Microsoft Visual Studio 12.0\VC') . |
|
2273 |
(programFiles,'\Microsoft Visual Studio 11.0\VC') . |
|
2274 |
(programFiles,'\Microsoft Visual Studio 10.0\VC') . |
|
2275 |
(programFiles,'\Microsoft Visual Studio 9.0\VC' ) . |
|
2276 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] |
|
2277 |
ifNone:nil. |
|
2278 |
]. |
|
2279 |
]. |
|
2280 |
(vcTop notNil and:[vcTop asFilename exists]) ifTrue:[ |
|
2281 |
useVisualC := true. |
|
2282 |
STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'. |
|
2283 |
||
2284 |
(sdkTop := SDKTop) isNil ifTrue:[ |
|
2285 |
sdkTop := { |
|
2286 |
(programFiles,'\Microsoft SDKs\Windows\v9.0A') . |
|
2287 |
(programFiles,'\Microsoft SDKs\Windows\v8.0A') . |
|
2288 |
(programFiles,'\Microsoft SDKs\Windows\v8.0A') . |
|
2289 |
(programFiles,'\Microsoft SDKs\Windows\v7.0A') . |
|
2290 |
(programFiles,'\Microsoft SDKs\Windows\v6.0A') . |
|
2291 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil. |
|
2292 |
]. |
|
2293 |
(sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[ |
|
2294 |
STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'. |
|
2295 |
]. |
|
2296 |
LibDirectory := topDirName,'\lib\vc'. |
|
2297 |
LinkArgs := '-L',topDirName,'\lib\vc'. |
|
2298 |
LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
|
2299 |
CCPath := vcTop,'\bin\cl.exe'. |
|
2300 |
LinkCommand := 'ilink32'. |
|
2301 |
MakeCommand := 'vcmake'. |
|
2302 |
CCCompilationOptions := '/nologo /ZI /w /GF /EHsc /FR.\objvc\'. |
|
2303 |
] ifFalse:[ |
|
2304 |
"/ add definitions for lcc, mingc etc. |
|
2305 |
"/ STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'. |
|
4252 | 2306 |
ExternalBytes sizeofPointer == 4 ifTrue:[ |
3960 | 2307 |
(mingwTop := MingwTop) isNil ifTrue:[ |
2308 |
mingwTop := { |
|
2309 |
(programFiles,'\mingw') . |
|
2310 |
(programFiles,'\mingw') . |
|
2311 |
('c:\mingw32') . |
|
2312 |
('c:\mingw') . |
|
2313 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]] |
|
2314 |
ifNone:nil. |
|
2315 |
]. |
|
2316 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
2317 |
useMingw32 := true. |
|
2318 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW32__'. |
|
2319 |
CCCompilationOptions := '-w32'. |
|
2320 |
]. |
|
2321 |
] ifFalse:[ |
|
2322 |
(mingwTop := MingwTop) isNil ifTrue:[ |
|
2323 |
mingwTop := { |
|
2324 |
(programFiles,'\mingw64') . |
|
2325 |
(programFiles,'\mingw') . |
|
2326 |
('c:\mingw64') . |
|
2327 |
('c:\mingw') . |
|
2328 |
} detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/gcc.exe') exists]] |
|
2329 |
ifNone:nil. |
|
2330 |
]. |
|
2331 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
2332 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW64__'. |
|
2333 |
"/ CCCompilationOptions := '-w64'. |
|
2334 |
]. |
|
2335 |
]. |
|
2336 |
(mingwTop notNil and:[mingwTop asFilename exists]) ifTrue:[ |
|
2337 |
STCCompilationDefines := STCCompilationDefines,' -D__MINGW__'. |
|
2338 |
CCPath := mingwTop,'\bin\gcc.exe'. |
|
2339 |
LinkCommand := 'gcc'. |
|
2340 |
MakeCommand := 'mingwmake'. |
|
2341 |
LibDirectory := topDirName,'\lib\mingw'. |
|
2342 |
LinkArgs := '-L',topDirName,'\lib\mingw'. |
|
2343 |
"/ LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
|
2344 |
]. |
|
2345 |
]. |
|
2346 |
]. |
|
2347 |
STCCompilationOptions := '+optinline +inlineNew'. |
|
2348 |
(topDirName,'\stc\stc.exe') asFilename exists ifTrue:[ |
|
2349 |
STCPath := (topDirName,'\stc\stc.exe'). |
|
2350 |
] ifFalse:[ |
|
2351 |
STCPath := 'stc.exe'. |
|
2352 |
]. |
|
2353 |
LibPath := ''. |
|
2354 |
SearchedLibraries := #('import32.lib'). |
|
2355 |
"/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib'). |
|
3576 | 2356 |
] ifFalse:[ |
3960 | 2357 |
STCCompilationIncludes := '-I',topDirName,'/include'. |
2358 |
STCCompilationDefines := ''. |
|
2359 |
STCCompilationOptions := '+optinline +inlineNew'. |
|
2360 |
STCPath := topDirName,'/stc/stc'. |
|
2361 |
||
2362 |
archArg := picArg := ''. |
|
4256 | 2363 |
optArg := '-O'. |
4252 | 2364 |
(ExternalBytes sizeofPointer == 4) ifTrue:[ |
3960 | 2365 |
archArg := ' -m32' |
2366 |
] ifFalse:[ |
|
2367 |
archArg := ' -m64'. "gcc -m64 needs -fPIC to make a shared library" |
|
2368 |
picArg := ' -fPIC'. |
|
2369 |
]. |
|
4256 | 2370 |
self useClang ifTrue:[ |
3960 | 2371 |
CCPath := 'clang' |
2372 |
] ifFalse:[ |
|
4256 | 2373 |
self useGnuC ifTrue:[ |
2374 |
CCPath := 'gcc'. |
|
4279 | 2375 |
optArg := '-O2 -fno-toplevel-reorder -fno-stack-protector -fno-strict-overflow'. |
3960 | 2376 |
] ifFalse:[ |
2377 |
CCPath := 'cc' |
|
2378 |
]. |
|
2379 |
]. |
|
4256 | 2380 |
CCCompilationOptions := STCCompilerInterface getCPUDefine, |
2381 |
' -D', self usedCompilerDefine, |
|
2382 |
' ', STCCompilerInterface getOSDefine, |
|
2383 |
' ', optArg, archArg, picArg. |
|
3960 | 2384 |
LinkArgs := archArg. |
2385 |
LinkCommand := CCPath. |
|
2386 |
LinkSharedArgs := '-shared'. |
|
2387 |
||
2388 |
OperatingSystem isOSXlike ifTrue:[ |
|
4017 | 2389 |
LinkSharedArgs := '-shared -mmacosx-version-min=10.5 -arch x86_64 librun.so'. |
2390 |
CCCompilationOptions := CCCompilationOptions ,' -mmacosx-version-min=10.5' |
|
3960 | 2391 |
]. |
2392 |
LibPath := ''. |
|
2393 |
SearchedLibraries := #(). |
|
2394 |
MakeCommand := 'make'. |
|
3576 | 2395 |
]. |
2396 |
||
4025 | 2397 |
(Smalltalk verbose and:[ Smalltalk infoPrinting ]) ifTrue:[ |
4017 | 2398 |
'ParserFlags [info]: STC Setup:' infoPrintCR. |
2399 |
('ParserFlags [info]: STCCompilationDefines: ',(STCCompilationDefines?'')) infoPrintCR. |
|
2400 |
('ParserFlags [info]: CCPath: ',CCPath asString) infoPrintCR. |
|
2401 |
('ParserFlags [info]: CCCompilationOptions: ',(CCCompilationOptions?'')) infoPrintCR. |
|
2402 |
('ParserFlags [info]: LinkCommand: ',LinkCommand asString) infoPrintCR. |
|
2403 |
('ParserFlags [info]: MakeCommand: ',MakeCommand asString) infoPrintCR. |
|
2404 |
('ParserFlags [info]: LinkArgs: ',(LinkArgs?''),' ',(LinkSharedArgs ?'')) infoPrintCR. |
|
2405 |
('ParserFlags [info]: STCModulePath: ',STCModulePath asString) infoPrintCR. |
|
3748 | 2406 |
]. |
2407 |
||
3576 | 2408 |
" |
2409 |
ParserFlags initializeSTCFlagsForTopDirectory:'../..' |
|
4017 | 2410 |
ParserFlags initialize |
3576 | 2411 |
" |
2412 |
||
2413 |
"Modified: / 09-08-2006 / 18:47:18 / fm" |
|
2414 |
"Created: / 06-08-2011 / 19:47:47 / cg" |
|
4256 | 2415 |
"Modified: / 11-05-2018 / 14:18:42 / stefan" |
4279 | 2416 |
"Modified: / 19-06-2018 / 10:47:21 / Stefan Vogel" |
3576 | 2417 |
! ! |
1634 | 2418 |
|
2685 | 2419 |
!ParserFlags methodsFor:'accessing'! |
2420 |
||
2927 | 2421 |
fullLineNumberInfo |
2422 |
^ (self lineNumberInfo == #full) |
|
2423 |
||
2424 |
"Created: / 26-09-2012 / 14:13:42 / cg" |
|
2425 |
! |
|
2426 |
||
2427 |
lineNumberInfo |
|
2428 |
^ lineNumberInfo |
|
2429 |
||
2430 |
"Created: / 26-09-2012 / 13:27:08 / cg" |
|
2431 |
! |
|
2432 |
||
2433 |
lineNumberInfo:something |
|
2434 |
lineNumberInfo := something. |
|
2435 |
||
2436 |
"Created: / 26-09-2012 / 13:27:17 / cg" |
|
2685 | 2437 |
! ! |
2438 |
||
1658 | 2439 |
!ParserFlags methodsFor:'accessing-compilation control'! |
2440 |
||
1668 | 2441 |
allowExtensionsToPrivateClasses |
2442 |
^ allowExtensionsToPrivateClasses |
|
2443 |
! |
|
2444 |
||
2445 |
allowExtensionsToPrivateClasses:aBoolean |
|
4339 | 2446 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2447 |
||
1668 | 2448 |
allowExtensionsToPrivateClasses := aBoolean |
4339 | 2449 |
|
2450 |
"Modified (comment): / 09-02-2019 / 15:52:10 / Claus Gittinger" |
|
1668 | 2451 |
! |
2452 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2453 |
allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2454 |
^ allowPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2455 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2456 |
"Created: / 16-11-2006 / 14:24:54 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2457 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2458 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2459 |
allowPossibleSTCCompilationProblems:aBoolean |
4339 | 2460 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2461 |
||
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2462 |
allowPossibleSTCCompilationProblems := aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2463 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2464 |
"Created: / 16-11-2006 / 14:24:56 / cg" |
4339 | 2465 |
"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
|
2466 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
2467 |
|
1658 | 2468 |
arraysAreImmutable |
2469 |
^ arraysAreImmutable |
|
2470 |
! |
|
2471 |
||
2472 |
arraysAreImmutable:aBoolean |
|
2473 |
arraysAreImmutable := aBoolean. |
|
2474 |
! |
|
2475 |
||
1717
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
2476 |
flattenVisualWorksNamespaces |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
2477 |
^ true |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
2478 |
! |
fff182879ce2
qualified names again (VW7);
Claus Gittinger <cg@exept.de>
parents:
1713
diff
changeset
|
2479 |
|
4478 | 2480 |
singlePrecisionFloatF |
2481 |
"by default, the 'f'-character in a float literal will generate |
|
2482 |
double-precision Float literals. |
|
2483 |
With singlePrecisionFloats, it will generate single precision ShortFloat literals. |
|
2484 |
The default is false. |
|
2485 |
Notice, that there is some confusion among Smalltalk systems, whether a float has |
|
2486 |
single or double precision (VW vs. V'age). |
|
2487 |
In ST/X, floats have double-precision by default." |
|
2488 |
||
2489 |
^ singlePrecisionFloatF |
|
2490 |
||
2491 |
"Created: / 26-05-2019 / 11:31:37 / Claus Gittinger" |
|
2492 |
"Modified (comment): / 08-06-2019 / 15:02:20 / Claus Gittinger" |
|
2493 |
! |
|
2494 |
||
2495 |
singlePrecisionFloatF:aBoolean |
|
2496 |
"by default, the 'f'-character in a float literal will generate |
|
2497 |
double-precision Float literals. |
|
2498 |
With singlePrecisionFloats, it will generate single precision ShortFloat literals. |
|
2499 |
The default is false. |
|
2500 |
Notice, that there is some confusion among Smalltalk systems, whether a float has |
|
2501 |
single or double precision (VW vs. V'age). |
|
2502 |
In ST/X, floats have double-precision by default." |
|
2503 |
||
2504 |
singlePrecisionFloatF := aBoolean |
|
2505 |
||
2506 |
"Created: / 26-05-2019 / 11:32:11 / Claus Gittinger" |
|
2507 |
"Modified (comment): / 08-06-2019 / 15:02:14 / Claus Gittinger" |
|
2508 |
! |
|
2509 |
||
1658 | 2510 |
stringsAreImmutable |
2511 |
^ stringsAreImmutable |
|
2512 |
! |
|
2513 |
||
2514 |
stringsAreImmutable:aBoolean |
|
2515 |
stringsAreImmutable := aBoolean. |
|
2516 |
! ! |
|
2517 |
||
2518 |
!ParserFlags methodsFor:'accessing-stc compilation control'! |
|
2519 |
||
2520 |
ccCompilationOptions |
|
1668 | 2521 |
^ ccCompilationOptions ? '' |
4043 | 2522 |
|
2523 |
" |
|
2524 |
self ccCompilationOptions |
|
2525 |
" |
|
2526 |
||
2527 |
"Modified (comment): / 17-11-2016 / 15:40:29 / cg" |
|
1658 | 2528 |
! |
2529 |
||
2530 |
ccCompilationOptions:something |
|
2531 |
ccCompilationOptions := something. |
|
2532 |
! |
|
2533 |
||
2534 |
ccPath |
|
2535 |
^ ccPath |
|
4043 | 2536 |
|
2537 |
" |
|
2538 |
self ccPath |
|
2539 |
" |
|
2540 |
||
2541 |
"Modified (comment): / 17-11-2016 / 15:40:40 / cg" |
|
1658 | 2542 |
! |
2543 |
||
2544 |
ccPath:something |
|
2545 |
ccPath := something. |
|
2546 |
! |
|
2547 |
||
2548 |
implicitSelfSends |
|
2549 |
^ implicitSelfSends |
|
2550 |
! |
|
2551 |
||
2552 |
implicitSelfSends:aBoolean |
|
2553 |
implicitSelfSends := aBoolean. |
|
2554 |
! |
|
2555 |
||
2556 |
libPath |
|
2557 |
^ libPath |
|
4043 | 2558 |
|
2559 |
" |
|
2560 |
self libPath |
|
2561 |
" |
|
2562 |
||
2563 |
"Modified (comment): / 17-11-2016 / 15:40:52 / cg" |
|
1658 | 2564 |
! |
2565 |
||
2566 |
libPath:aString |
|
2567 |
libPath := aString |
|
2568 |
! |
|
2569 |
||
2570 |
linkArgs |
|
2571 |
^ linkArgs |
|
4043 | 2572 |
|
2573 |
" |
|
2574 |
self linkArgs |
|
2575 |
" |
|
2576 |
||
2577 |
"Modified (comment): / 17-11-2016 / 15:41:03 / cg" |
|
1658 | 2578 |
! |
2579 |
||
2580 |
linkArgs:aString |
|
2581 |
linkArgs := aString |
|
2582 |
! |
|
2583 |
||
2584 |
linkCommand |
|
4475 | 2585 |
^ linkCommand ? self class linkCommand |
4043 | 2586 |
|
2587 |
" |
|
4475 | 2588 |
self new linkCommand |
4043 | 2589 |
" |
2590 |
||
2591 |
"Modified (comment): / 17-11-2016 / 15:41:16 / cg" |
|
1658 | 2592 |
! |
2593 |
||
2594 |
linkCommand:aString |
|
2595 |
linkCommand := aString |
|
2596 |
! |
|
2597 |
||
1898 | 2598 |
linkSharedArgs |
2599 |
^ linkSharedArgs |
|
2600 |
! |
|
2601 |
||
2602 |
linkSharedArgs:aString |
|
2603 |
linkSharedArgs := aString |
|
2604 |
! |
|
2605 |
||
1658 | 2606 |
searchedLibraries |
2607 |
^ searchedLibraries |
|
2608 |
! |
|
2609 |
||
2610 |
searchedLibraries:aString |
|
2611 |
searchedLibraries := aString |
|
2612 |
! |
|
2613 |
||
2614 |
stcCompilation |
|
2615 |
^ stcCompilation |
|
2616 |
! |
|
2617 |
||
2618 |
stcCompilation:something |
|
2619 |
stcCompilation := something. |
|
2620 |
! |
|
2621 |
||
2622 |
stcCompilationDefines |
|
2623 |
^ stcCompilationDefines |
|
2624 |
! |
|
2625 |
||
2626 |
stcCompilationDefines:something |
|
2627 |
stcCompilationDefines := something. |
|
2628 |
! |
|
2629 |
||
2630 |
stcCompilationIncludes |
|
2631 |
^ stcCompilationIncludes |
|
4043 | 2632 |
|
2633 |
" |
|
2634 |
self stcCompilationIncludes |
|
2635 |
" |
|
2636 |
||
2637 |
"Modified (comment): / 17-11-2016 / 15:41:43 / cg" |
|
1658 | 2638 |
! |
2639 |
||
2640 |
stcCompilationIncludes:something |
|
2641 |
stcCompilationIncludes := something. |
|
2642 |
! |
|
2643 |
||
2644 |
stcCompilationOptions |
|
2645 |
^ stcCompilationOptions |
|
2646 |
! |
|
2647 |
||
2648 |
stcCompilationOptions:something |
|
2649 |
stcCompilationOptions := something. |
|
2650 |
! |
|
2651 |
||
2652 |
stcKeepCIntermediate |
|
2701
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2653 |
^ stcKeepCIntermediate ? false |
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2654 |
|
36ad61f458e8
changed: #stcKeepCIntermediate
Claus Gittinger <cg@exept.de>
parents:
2690
diff
changeset
|
2655 |
"Modified: / 16-09-2011 / 19:56:22 / cg" |
1658 | 2656 |
! |
2657 |
||
2658 |
stcKeepCIntermediate:something |
|
2659 |
stcKeepCIntermediate := something. |
|
2660 |
! |
|
2661 |
||
2662 |
stcKeepOIntermediate |
|
2702 | 2663 |
^ stcKeepOIntermediate ? false |
2664 |
||
2665 |
"Modified: / 16-09-2011 / 19:56:52 / cg" |
|
1658 | 2666 |
! |
2667 |
||
2668 |
stcKeepOIntermediate:something |
|
2669 |
stcKeepOIntermediate := something. |
|
2670 |
! |
|
2671 |
||
2490 | 2672 |
stcKeepSIntermediate |
2673 |
^ false |
|
2674 |
"/ ^ true |
|
2675 |
! |
|
2676 |
||
1658 | 2677 |
stcKeepSTIntermediate |
2702 | 2678 |
^ stcKeepSTIntermediate ? false |
2679 |
||
2680 |
"Modified: / 16-09-2011 / 19:57:11 / cg" |
|
1658 | 2681 |
! |
2682 |
||
2683 |
stcKeepSTIntermediate:something |
|
2684 |
stcKeepSTIntermediate := something. |
|
2685 |
! |
|
2686 |
||
2687 |
stcModulePath |
|
4012 | 2688 |
stcModulePath isNil ifTrue:[^ self class stcModulePath]. |
2689 |
^ stcModulePath |
|
1658 | 2690 |
! |
2691 |
||
4013 | 2692 |
stcModulePath:aPath |
2693 |
"set the path to the directory (for an individual compilation context). |
|
2694 |
Obsolete now, as this should not be set from the outside, |
|
2695 |
but instead rely totally on the userPreferences." |
|
2696 |
||
2697 |
stcModulePath := aPath. |
|
1658 | 2698 |
! |
2699 |
||
2700 |
stcPath |
|
2701 |
^ stcPath |
|
2702 |
! |
|
2703 |
||
4017 | 2704 |
stcPath:aPath |
2705 |
stcPath := aPath. |
|
1658 | 2706 |
! ! |
2707 |
||
2708 |
!ParserFlags methodsFor:'accessing-syntax-control'! |
|
1634 | 2709 |
|
2710 |
allowArrayIndexSyntaxExtension |
|
4301 | 2711 |
"experimental syntax: var[idx-expr]" |
2712 |
||
4179 | 2713 |
^ allowArrayIndexSyntaxExtension ? false |
2714 |
||
2715 |
"Modified: / 08-08-2017 / 16:57:03 / cg" |
|
4437 | 2716 |
"Modified (comment): / 08-06-2019 / 15:00:13 / Claus Gittinger" |
1634 | 2717 |
! |
2718 |
||
2719 |
allowArrayIndexSyntaxExtension:aBoolean |
|
4301 | 2720 |
"experimental syntax: var[idx-expr]" |
4339 | 2721 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
4301 | 2722 |
|
1634 | 2723 |
allowArrayIndexSyntaxExtension := aBoolean. |
4301 | 2724 |
|
4339 | 2725 |
"Modified (comment): / 09-02-2019 / 15:51:18 / Claus Gittinger" |
1634 | 2726 |
! |
2727 |
||
3220 | 2728 |
allowAssignmentToBlockArgument |
2729 |
^ allowAssignmentToBlockArgument |
|
2730 |
! |
|
2731 |
||
2732 |
allowAssignmentToBlockArgument:aBoolean |
|
4339 | 2733 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2734 |
||
3220 | 2735 |
allowAssignmentToBlockArgument := aBoolean. |
4339 | 2736 |
|
2737 |
"Modified (comment): / 09-02-2019 / 15:51:22 / Claus Gittinger" |
|
3220 | 2738 |
! |
2739 |
||
2740 |
allowAssignmentToMethodArgument |
|
2741 |
^ allowAssignmentToMethodArgument |
|
2742 |
! |
|
2743 |
||
2744 |
allowAssignmentToMethodArgument:aBoolean |
|
4339 | 2745 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2746 |
||
3220 | 2747 |
allowAssignmentToMethodArgument := aBoolean. |
4339 | 2748 |
|
2749 |
"Modified (comment): / 09-02-2019 / 15:51:27 / Claus Gittinger" |
|
3220 | 2750 |
! |
2751 |
||
2752 |
allowAssignmentToPoolVariable |
|
2753 |
^ allowAssignmentToPoolVariable |
|
2754 |
! |
|
2755 |
||
2756 |
allowAssignmentToPoolVariable:aBoolean |
|
4339 | 2757 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2758 |
||
3220 | 2759 |
allowAssignmentToPoolVariable := aBoolean. |
4339 | 2760 |
|
2761 |
"Modified (comment): / 09-02-2019 / 15:51:29 / Claus Gittinger" |
|
3220 | 2762 |
! |
2763 |
||
4478 | 2764 |
allowCIntegers |
2765 |
"allow c-style integers of the form: 0xHHH, 0bBBB and 0oOOO" |
|
2766 |
||
2767 |
^ allowCIntegers ? false. |
|
2768 |
! |
|
2769 |
||
2770 |
allowCIntegers:aBoolean |
|
2771 |
"allow c-style integers of the form: 0xHHH, 0bBBB and 0oOOO" |
|
2772 |
||
2773 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
|
2774 |
||
2775 |
allowCIntegers := aBoolean |
|
2776 |
! |
|
2777 |
||
4333 | 2778 |
allowCStrings |
4412 | 2779 |
"cstrings have the syntax: |
2780 |
c'...' |
|
2781 |
where inside the string, c-language escapes are recognized" |
|
2782 |
||
4333 | 2783 |
^ allowCStrings ? false. |
2784 |
||
2785 |
"Created: / 08-02-2019 / 18:28:33 / Claus Gittinger" |
|
4412 | 2786 |
"Modified (comment): / 23-05-2019 / 10:26:31 / Claus Gittinger" |
4333 | 2787 |
! |
2788 |
||
2789 |
allowCStrings:aBoolean |
|
4412 | 2790 |
"cstrings have the syntax: |
2791 |
c'...' |
|
2792 |
where inside the string, c-language escapes are recognized" |
|
2793 |
||
4339 | 2794 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2795 |
||
4333 | 2796 |
allowCStrings := aBoolean |
2797 |
||
2798 |
"Created: / 08-02-2019 / 18:28:47 / Claus Gittinger" |
|
4412 | 2799 |
"Modified (comment): / 23-05-2019 / 10:26:36 / Claus Gittinger" |
4333 | 2800 |
! |
2801 |
||
2306 | 2802 |
allowCaretAsBinop |
2803 |
^ allowCaretAsBinop |
|
2804 |
! |
|
2805 |
||
2806 |
allowCaretAsBinop:aBoolean |
|
4339 | 2807 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2808 |
||
2306 | 2809 |
allowCaretAsBinop := aBoolean. |
4339 | 2810 |
|
2811 |
"Modified (comment): / 09-02-2019 / 15:51:38 / Claus Gittinger" |
|
2306 | 2812 |
! |
2813 |
||
2312 | 2814 |
allowCharacterEscapes |
2815 |
^ allowCharacterEscapes |
|
2816 |
! |
|
2817 |
||
2818 |
allowCharacterEscapes:aBoolean |
|
4339 | 2819 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2820 |
||
2312 | 2821 |
allowCharacterEscapes := aBoolean. |
4339 | 2822 |
|
2823 |
"Modified (comment): / 09-02-2019 / 15:51:41 / Claus Gittinger" |
|
2312 | 2824 |
! |
2825 |
||
1634 | 2826 |
allowDollarInIdentifier |
2827 |
^ allowDollarInIdentifier |
|
2828 |
! |
|
2829 |
||
2830 |
allowDollarInIdentifier:aBoolean |
|
4339 | 2831 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2832 |
||
1634 | 2833 |
allowDollarInIdentifier := aBoolean. |
4339 | 2834 |
|
2835 |
"Modified (comment): / 09-02-2019 / 15:51:47 / Claus Gittinger" |
|
1634 | 2836 |
! |
2837 |
||
2838 |
allowDolphinExtensions |
|
2839 |
^ allowDolphinExtensions |
|
2840 |
! |
|
2841 |
||
2842 |
allowDolphinExtensions:aBoolean |
|
4339 | 2843 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2844 |
||
1634 | 2845 |
allowDolphinExtensions := aBoolean |
4339 | 2846 |
|
2847 |
"Modified (comment): / 09-02-2019 / 15:51:50 / Claus Gittinger" |
|
1634 | 2848 |
! |
2849 |
||
2850 |
allowDomainVariables |
|
2851 |
^ allowDomainVariables |
|
2852 |
! |
|
2853 |
||
2854 |
allowDomainVariables:aBoolean |
|
4339 | 2855 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2856 |
||
1634 | 2857 |
allowDomainVariables := aBoolean. |
4339 | 2858 |
|
2859 |
"Modified (comment): / 09-02-2019 / 15:51:55 / Claus Gittinger" |
|
1634 | 2860 |
! |
2861 |
||
4412 | 2862 |
allowEStrings |
2863 |
"estrings have the syntax: |
|
2864 |
e'...' |
|
2865 |
where inside the string, c-language escapes are recognized |
|
2866 |
AND embedded expressions {expr} are sliced into the string." |
|
2867 |
||
2868 |
^ allowEStrings ? false. |
|
2869 |
||
2870 |
"Created: / 23-05-2019 / 10:25:50 / Claus Gittinger" |
|
2871 |
! |
|
2872 |
||
2873 |
allowEStrings:aBoolean |
|
2874 |
"estrings have the syntax: |
|
2875 |
e'...' |
|
2876 |
where inside the string, c-language escapes are recognized |
|
2877 |
AND embedded expressions {expr} are sliced into the string." |
|
2878 |
||
2879 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
|
2880 |
||
2881 |
allowEStrings := aBoolean |
|
2882 |
||
2883 |
"Created: / 23-05-2019 / 10:26:02 / Claus Gittinger" |
|
2884 |
! |
|
2885 |
||
1950 | 2886 |
allowEmptyStatements |
2887 |
^ allowEmptyStatements ? false |
|
2888 |
||
2889 |
"Created: / 20-11-2006 / 13:56:14 / cg" |
|
2890 |
! |
|
2891 |
||
2892 |
allowEmptyStatements:aBoolean |
|
4339 | 2893 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2894 |
||
1950 | 2895 |
allowEmptyStatements := aBoolean. |
2896 |
||
2897 |
"Created: / 20-11-2006 / 14:26:48 / cg" |
|
4339 | 2898 |
"Modified (comment): / 09-02-2019 / 15:51:58 / Claus Gittinger" |
1950 | 2899 |
! |
2900 |
||
1634 | 2901 |
allowExtendedBinarySelectors |
4636 | 2902 |
^ allowExtendedBinarySelectors ? false |
1634 | 2903 |
! |
2904 |
||
2905 |
allowExtendedBinarySelectors:aBoolean |
|
4339 | 2906 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2907 |
||
1634 | 2908 |
allowExtendedBinarySelectors := aBoolean. |
4339 | 2909 |
|
2910 |
"Modified (comment): / 09-02-2019 / 15:52:01 / Claus Gittinger" |
|
1634 | 2911 |
! |
2912 |
||
2913 |
allowExtendedSTXSyntax |
|
4413 | 2914 |
"enables ALL of the ST/X extensions. |
2915 |
Do not use for now, as stc does not support all of them" |
|
2916 |
||
1634 | 2917 |
^ allowExtendedSTXSyntax |
4413 | 2918 |
|
2919 |
"Modified (comment): / 23-05-2019 / 10:36:04 / Claus Gittinger" |
|
1634 | 2920 |
! |
2921 |
||
3220 | 2922 |
allowExtendedSTXSyntax:aBoolean |
4413 | 2923 |
"enables ALL of the ST/X extensions. |
2924 |
Do not use for now, as stc does not support all of them" |
|
2925 |
||
4339 | 2926 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2927 |
||
3220 | 2928 |
allowExtendedSTXSyntax := aBoolean. |
4339 | 2929 |
|
4413 | 2930 |
"Modified (comment): / 23-05-2019 / 10:41:41 / Claus Gittinger" |
1634 | 2931 |
! |
2932 |
||
2933 |
allowFixedPointLiterals |
|
4636 | 2934 |
"return true, if nnnsn (FixedPoint / ScaledDecimal) literals are allowed. |
2935 |
The default is true." |
|
2936 |
||
2937 |
^ allowFixedPointLiterals ? true |
|
1634 | 2938 |
! |
2939 |
||
3220 | 2940 |
allowFixedPointLiterals:aBoolean |
4339 | 2941 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2942 |
||
3220 | 2943 |
allowFixedPointLiterals := aBoolean. |
4339 | 2944 |
|
2945 |
"Modified (comment): / 09-02-2019 / 15:52:13 / Claus Gittinger" |
|
1634 | 2946 |
! |
2947 |
||
2948 |
allowFunctionCallSyntaxForBlockEvaluation |
|
4179 | 2949 |
^ allowFunctionCallSyntaxForBlockEvaluation ? false |
2950 |
||
2951 |
"Modified: / 08-08-2017 / 16:57:17 / cg" |
|
1634 | 2952 |
! |
2953 |
||
2954 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean |
|
4339 | 2955 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2956 |
||
1634 | 2957 |
allowFunctionCallSyntaxForBlockEvaluation := aBoolean. |
4339 | 2958 |
|
2959 |
"Modified (comment): / 09-02-2019 / 15:52:19 / Claus Gittinger" |
|
1634 | 2960 |
! |
2961 |
||
4436 | 2962 |
allowGreekCharactersInIdentifier |
2963 |
^ allowGreekCharactersInIdentifier |
|
2964 |
||
2965 |
"Created: / 08-06-2019 / 14:52:42 / Claus Gittinger" |
|
2966 |
! |
|
2967 |
||
2968 |
allowGreekCharactersInIdentifier:aBoolean |
|
4437 | 2969 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2970 |
||
4436 | 2971 |
allowGreekCharactersInIdentifier := aBoolean |
2972 |
||
2973 |
"Created: / 08-06-2019 / 14:54:55 / Claus Gittinger" |
|
2974 |
! |
|
2975 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2976 |
allowHashAsBinarySelector |
1713 | 2977 |
^ allowHashAsBinarySelector |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2978 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
2979 |
|
4485 | 2980 |
allowInlineObjects |
2981 |
"return true, if inline objects are allowed" |
|
2982 |
||
2983 |
^ allowInlineObjects |
|
2984 |
||
2985 |
||
2986 |
! |
|
2987 |
||
2988 |
allowInlineObjects:aBoolean |
|
2989 |
"if true, inline objects are allowed" |
|
2990 |
||
2991 |
allowInlineObjects := aBoolean |
|
2992 |
! |
|
2993 |
||
4185 | 2994 |
allowJavaScriptConst |
4437 | 2995 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
2996 |
||
4185 | 2997 |
^ allowJavaScriptConst |
2998 |
||
2999 |
"Created: / 08-08-2017 / 23:50:12 / cg" |
|
4437 | 3000 |
"Modified (comment): / 08-06-2019 / 15:00:52 / Claus Gittinger" |
4185 | 3001 |
! |
3002 |
||
3003 |
allowJavaScriptConst:aBoolean |
|
3004 |
allowJavaScriptConst := aBoolean |
|
3005 |
||
3006 |
"Created: / 08-08-2017 / 23:50:23 / cg" |
|
3007 |
! |
|
3008 |
||
1634 | 3009 |
allowLazyValueExtension |
4428 | 3010 |
"allow !![...] to generate a lazy value" |
3011 |
||
1634 | 3012 |
^ allowLazyValueExtension |
4428 | 3013 |
|
3014 |
"Modified (comment): / 03-06-2019 / 10:57:32 / Claus Gittinger" |
|
1634 | 3015 |
! |
3016 |
||
3220 | 3017 |
allowLazyValueExtension:aBoolean |
4428 | 3018 |
"allow !![...] to generate a lazy value" |
4339 | 3019 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3020 |
||
3220 | 3021 |
allowLazyValueExtension := aBoolean. |
4339 | 3022 |
|
4428 | 3023 |
"Modified (comment): / 03-06-2019 / 10:57:58 / Claus Gittinger" |
1634 | 3024 |
! |
3025 |
||
3026 |
allowLiteralNameSpaceSymbols |
|
3027 |
^ allowLiteralNameSpaceSymbols |
|
3028 |
! |
|
3029 |
||
3030 |
allowLiteralNameSpaceSymbols:aBoolean |
|
4339 | 3031 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3032 |
||
1634 | 3033 |
allowLiteralNameSpaceSymbols := aBoolean |
4339 | 3034 |
|
3035 |
"Modified (comment): / 09-02-2019 / 15:52:36 / Claus Gittinger" |
|
1634 | 3036 |
! |
3037 |
||
3038 |
allowLocalVariableDeclarationWithInitializerExpression |
|
3039 |
^ allowLocalVariableDeclarationWithInitializerExpression |
|
3040 |
! |
|
3041 |
||
3042 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean |
|
4339 | 3043 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3044 |
||
1634 | 3045 |
allowLocalVariableDeclarationWithInitializerExpression := aBoolean. |
4339 | 3046 |
|
3047 |
"Modified (comment): / 09-02-2019 / 15:52:43 / Claus Gittinger" |
|
1634 | 3048 |
! |
3049 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3050 |
allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3051 |
^ allowNationalCharactersInIdentifier |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3052 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3053 |
|
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3054 |
allowNationalCharactersInIdentifier:aBoolean |
4339 | 3055 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3056 |
||
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3057 |
allowNationalCharactersInIdentifier := aBoolean |
4339 | 3058 |
|
3059 |
"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
|
3060 |
! |
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3061 |
|
1634 | 3062 |
allowOldStyleAssignment |
4039 | 3063 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed" |
3064 |
||
1634 | 3065 |
^ allowOldStyleAssignment |
3066 |
! |
|
3067 |
||
3068 |
allowOldStyleAssignment:aBoolean |
|
4039 | 3069 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed" |
4339 | 3070 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3071 |
||
1634 | 3072 |
allowOldStyleAssignment := aBoolean |
4339 | 3073 |
|
3074 |
"Modified (format): / 09-02-2019 / 15:52:52 / Claus Gittinger" |
|
1634 | 3075 |
! |
3076 |
||
4041 | 3077 |
allowParagraphInIdentifier |
4437 | 3078 |
"return true, if §-characters are allowed in identifiers (treated as letter)" |
3079 |
||
4041 | 3080 |
^ allowParagraphInIdentifier |
3081 |
||
3082 |
"Created: / 16-11-2016 / 22:29:06 / cg" |
|
4437 | 3083 |
"Modified (comment): / 08-06-2019 / 14:59:39 / Claus Gittinger" |
4041 | 3084 |
! |
3085 |
||
3086 |
allowParagraphInIdentifier:aBoolean |
|
4339 | 3087 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3088 |
||
4041 | 3089 |
allowParagraphInIdentifier := aBoolean. |
3090 |
||
3091 |
"Created: / 16-11-2016 / 22:29:14 / cg" |
|
4339 | 3092 |
"Modified (comment): / 09-02-2019 / 15:52:54 / Claus Gittinger" |
4041 | 3093 |
! |
3094 |
||
4301 | 3095 |
allowPeriodAsNameSpaceSeparator |
3096 |
"experimental syntax: foo.bar" |
|
3097 |
||
3098 |
^ allowPeriodAsNameSpaceSeparator ? false |
|
3099 |
||
3100 |
"Created: / 23-09-2018 / 00:48:59 / Claus Gittinger" |
|
3101 |
! |
|
3102 |
||
3103 |
allowPeriodAsNameSpaceSeparator:aBoolean |
|
3104 |
"experimental syntax: foo.bar" |
|
4339 | 3105 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3106 |
||
4301 | 3107 |
|
3108 |
allowPeriodAsNameSpaceSeparator := aBoolean |
|
3109 |
||
3110 |
"Created: / 23-09-2018 / 00:49:09 / Claus Gittinger" |
|
4339 | 3111 |
"Modified (comment): / 09-02-2019 / 15:53:00 / Claus Gittinger" |
4301 | 3112 |
! |
3113 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3114 |
allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3115 |
^ allowPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3116 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3117 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3118 |
allowPeriodInSymbol:aBoolean |
4339 | 3119 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3120 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3121 |
allowPeriodInSymbol := aBoolean |
4339 | 3122 |
|
3123 |
"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
|
3124 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3125 |
|
1634 | 3126 |
allowQualifiedNames |
4302 | 3127 |
"return true, if '#{..}' and 'namespace.varName' qualified names are allowed" |
3128 |
||
1634 | 3129 |
^ allowQualifiedNames |
4302 | 3130 |
|
3131 |
"Modified (comment): / 23-09-2018 / 01:08:34 / Claus Gittinger" |
|
1634 | 3132 |
! |
3133 |
||
3134 |
allowQualifiedNames:aBoolean |
|
4339 | 3135 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3136 |
||
1634 | 3137 |
allowQualifiedNames := aBoolean. |
4339 | 3138 |
|
3139 |
"Modified (comment): / 09-02-2019 / 15:53:11 / Claus Gittinger" |
|
1634 | 3140 |
! |
3141 |
||
4430 | 3142 |
allowRStrings |
3143 |
"rstrings have the syntax: |
|
3144 |
r'...' |
|
3145 |
which generates a regex" |
|
3146 |
||
3147 |
^ allowRStrings ? false. |
|
3148 |
||
3149 |
"Created: / 03-06-2019 / 11:11:25 / Claus Gittinger" |
|
3150 |
! |
|
3151 |
||
3152 |
allowRStrings:aBoolean |
|
3153 |
"rstrings have the syntax: |
|
3154 |
r'...' |
|
3155 |
which generates a regex" |
|
4437 | 3156 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
4430 | 3157 |
|
3158 |
allowRStrings := aBoolean |
|
3159 |
||
3160 |
"Created: / 03-06-2019 / 11:11:51 / Claus Gittinger" |
|
4437 | 3161 |
"Modified (comment): / 08-06-2019 / 15:01:17 / Claus Gittinger" |
4430 | 3162 |
! |
3163 |
||
1634 | 3164 |
allowReservedWordsAsSelectors |
4449 | 3165 |
"if true, 'self', 'super', 'thisContext', 'nil', 'true' and 'false' are allowed |
3166 |
as unary message selectors." |
|
3167 |
||
1634 | 3168 |
^ allowReservedWordsAsSelectors |
4449 | 3169 |
|
3170 |
"Modified (comment): / 25-06-2019 / 11:16:52 / Claus Gittinger" |
|
1634 | 3171 |
! |
3172 |
||
3173 |
allowReservedWordsAsSelectors:aBoolean |
|
4449 | 3174 |
"enable/disable, if 'self', 'super', 'thisContext', 'nil', 'true' and 'false' are to be allowed |
3175 |
as unary message selectors." |
|
3176 |
||
4339 | 3177 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3178 |
||
1634 | 3179 |
allowReservedWordsAsSelectors := aBoolean. |
4339 | 3180 |
|
4449 | 3181 |
"Modified (comment): / 25-06-2019 / 11:18:06 / Claus Gittinger" |
1634 | 3182 |
! |
3183 |
||
1703 | 3184 |
allowSTVExtensions |
3185 |
"return true, if support for ST/V extensions is enabled." |
|
3186 |
||
3187 |
^ allowSTVExtensions |
|
3188 |
! |
|
3189 |
||
4339 | 3190 |
allowSTVExtensions:aBoolean |
3191 |
"if support for ST/V extensions is enabled." |
|
3192 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
|
3193 |
||
3194 |
allowSTVExtensions := aBoolean |
|
3195 |
||
3196 |
"Created: / 09-02-2019 / 15:53:32 / Claus Gittinger" |
|
3197 |
! |
|
3198 |
||
1701 | 3199 |
allowSTVPrimitives |
3200 |
"return true, if support for ST/V primitives is enabled." |
|
3201 |
||
3202 |
^ allowSTVPrimitives |
|
3203 |
! |
|
3204 |
||
4339 | 3205 |
allowSTVPrimitives:aBoolean |
3206 |
"if support for ST/V primitives is enabled." |
|
3207 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
|
3208 |
||
3209 |
allowSTVPrimitives := aBoolean |
|
3210 |
||
3211 |
"Created: / 09-02-2019 / 15:53:53 / Claus Gittinger" |
|
3212 |
! |
|
3213 |
||
2984 | 3214 |
allowSTXDelimiterComments |
3946 | 3215 |
"are ST/X token-delimited comments allowed? |
3216 |
(see comment on class side)" |
|
3217 |
||
2984 | 3218 |
^ allowSTXDelimiterComments |
3219 |
! |
|
3220 |
||
3221 |
allowSTXDelimiterComments:aBoolean |
|
4339 | 3222 |
"are ST/X token-delimited comments allowed? (default is true) |
3946 | 3223 |
(see comment on class side)" |
4339 | 3224 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3946 | 3225 |
|
2984 | 3226 |
allowSTXDelimiterComments := aBoolean. |
3227 |
||
3228 |
" |
|
3229 |
ParserFlags allowSTXDelimiterComments:false |
|
3230 |
ParserFlags allowSTXDelimiterComments:true |
|
3231 |
" |
|
4339 | 3232 |
|
3233 |
"Modified (comment): / 09-02-2019 / 15:54:26 / Claus Gittinger" |
|
2984 | 3234 |
! |
3235 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3236 |
allowSTXEOLComments |
3946 | 3237 |
"are ST/X end-of-line comments allowed?" |
3238 |
||
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3239 |
^ allowSTXEOLComments |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3240 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3241 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3242 |
allowSTXEOLComments:aBoolean |
4339 | 3243 |
"are ST/X end-of-line comments allowed? (default is true)" |
3244 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
|
3946 | 3245 |
|
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3246 |
allowSTXEOLComments := aBoolean. |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3247 |
|
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3248 |
" |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3249 |
ParserFlags allowSTXEOLComments:false |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3250 |
ParserFlags allowSTXEOLComments:true |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3251 |
" |
4339 | 3252 |
|
3253 |
"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
|
3254 |
! |
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3255 |
|
3945 | 3256 |
allowSTXExtendedArrayLiterals |
3946 | 3257 |
"are scheme-style typed literal arrays allowed?" |
3258 |
||
3945 | 3259 |
^ allowSTXExtendedArrayLiterals ? false |
3260 |
! |
|
3261 |
||
3262 |
allowSTXExtendedArrayLiterals:aBoolean |
|
3946 | 3263 |
"are scheme-style typed literal arrays allowed?" |
4339 | 3264 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3946 | 3265 |
|
3945 | 3266 |
allowSTXExtendedArrayLiterals := aBoolean |
4339 | 3267 |
|
3268 |
"Modified (comment): / 09-02-2019 / 15:54:33 / Claus Gittinger" |
|
3945 | 3269 |
! |
3270 |
||
4487 | 3271 |
allowSTXExtensions |
3272 |
"if false, support for ST/X extensions is generally disabled. |
|
3273 |
if true, individual control flags may apply" |
|
3274 |
||
3275 |
^ allowSTXExtensions |
|
3276 |
! |
|
3277 |
||
3278 |
allowSTXExtensions:aBoolean |
|
3279 |
"if false, support for ST/X extensions is generally disabled. |
|
3280 |
if true, individual control flags may apply" |
|
3281 |
||
3282 |
allowSTXExtensions := aBoolean |
|
3283 |
! |
|
3284 |
||
2494 | 3285 |
allowSTXFunctions |
3286 |
^ false |
|
3287 |
||
3288 |
"Created: / 23-05-2011 / 17:43:45 / cg" |
|
3289 |
! |
|
3290 |
||
3783 | 3291 |
allowSignedByteArrayElements |
4085 | 3292 |
^ allowSignedByteArrayElements |
3293 |
! |
|
3294 |
||
3295 |
allowSignedByteArrayElements:aBoolean |
|
4339 | 3296 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3297 |
||
4085 | 3298 |
allowSignedByteArrayElements := aBoolean |
4339 | 3299 |
|
3300 |
"Modified (comment): / 09-02-2019 / 15:54:39 / Claus Gittinger" |
|
3783 | 3301 |
! |
3302 |
||
3576 | 3303 |
allowSqueakExtensions |
3304 |
"return true, if support for squeak extensions |
|
4256 | 3305 |
computed arrays { .., } |
3306 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
3576 | 3307 |
is enabled." |
3308 |
||
3309 |
^ allowSqueakExtensions |
|
3310 |
! |
|
3311 |
||
3312 |
allowSqueakExtensions:aBoolean |
|
3313 |
"this allows turning on/off support for squeak extensions: |
|
4339 | 3314 |
computed arrays { .., } |
3315 |
c/java style arguments in message sends rec foo(arg1, ... argN) |
|
3316 |
attn: possibly sent via perform (Parser >> parsePragma) |
|
3576 | 3317 |
" |
3318 |
||
3319 |
allowSqueakExtensions := aBoolean |
|
4339 | 3320 |
|
3321 |
"Modified (comment): / 09-02-2019 / 15:54:53 / Claus Gittinger" |
|
3576 | 3322 |
! |
1634 | 3323 |
|
1689 | 3324 |
allowSqueakPrimitives |
3325 |
"return true, if support for squeak primitives is enabled." |
|
3326 |
||
3327 |
^ allowSqueakPrimitives |
|
3328 |
! |
|
3329 |
||
3330 |
allowSqueakPrimitives:aBoolean |
|
3331 |
"this allows turning on/off support for squeak primitives" |
|
4339 | 3332 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
1689 | 3333 |
|
3334 |
allowSqueakPrimitives := aBoolean |
|
4339 | 3335 |
|
3336 |
"Modified (comment): / 09-02-2019 / 15:55:01 / Claus Gittinger" |
|
1689 | 3337 |
! |
3338 |
||
2313 | 3339 |
allowStringEscapes |
3340 |
^ allowStringEscapes |
|
3341 |
! |
|
3342 |
||
3343 |
allowStringEscapes:aBoolean |
|
4339 | 3344 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3345 |
||
2313 | 3346 |
allowStringEscapes := aBoolean. |
4339 | 3347 |
|
3348 |
"Modified (comment): / 09-02-2019 / 15:55:04 / Claus Gittinger" |
|
2313 | 3349 |
! |
3350 |
||
4149 | 3351 |
allowSymbolsStartingWithDigit |
3352 |
"return true, if a symbol is allowed to start with a digit |
|
3353 |
i.e. as in #2D. |
|
3354 |
This seems to be ok in new Squeak/Pharo versions" |
|
3355 |
||
3356 |
^ allowSymbolsStartingWithDigit |
|
3357 |
||
3358 |
"Created: / 18-06-2017 / 16:26:08 / cg" |
|
3359 |
! |
|
3360 |
||
3361 |
allowSymbolsStartingWithDigit:aBoolean |
|
3362 |
"control if a symbol is allowed to start with a digit |
|
3363 |
i.e. as in #2D. |
|
4339 | 3364 |
This seems to be ok in new Squeak/Pharo versions. |
3365 |
attn: possibly sent via perform (Parser >> parsePragma)" |
|
4149 | 3366 |
|
3367 |
allowSymbolsStartingWithDigit := aBoolean |
|
3368 |
||
3369 |
"Created: / 18-06-2017 / 16:26:23 / cg" |
|
4339 | 3370 |
"Modified (comment): / 09-02-2019 / 15:55:14 / Claus Gittinger" |
4149 | 3371 |
! |
3372 |
||
1634 | 3373 |
allowUnderscoreInIdentifier |
3374 |
^ allowUnderscoreInIdentifier |
|
3375 |
! |
|
3376 |
||
3377 |
allowUnderscoreInIdentifier:aBoolean |
|
4339 | 3378 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3379 |
||
1634 | 3380 |
allowUnderscoreInIdentifier := aBoolean |
4339 | 3381 |
|
3382 |
"Modified (comment): / 09-02-2019 / 15:55:21 / Claus Gittinger" |
|
1634 | 3383 |
! |
3384 |
||
2310 | 3385 |
allowUnicodeCharacters |
3386 |
^ allowUnicodeCharacters |
|
3387 |
! |
|
3388 |
||
3389 |
allowUnicodeCharacters:aBoolean |
|
4339 | 3390 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3391 |
||
2310 | 3392 |
allowUnicodeCharacters := aBoolean |
4339 | 3393 |
|
3394 |
"Modified (comment): / 09-02-2019 / 15:55:25 / Claus Gittinger" |
|
2310 | 3395 |
! |
3396 |
||
2307 | 3397 |
allowUnicodeStrings |
3398 |
^ allowUnicodeStrings |
|
3399 |
! |
|
3400 |
||
3401 |
allowUnicodeStrings:aBoolean |
|
4339 | 3402 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3403 |
||
2307 | 3404 |
allowUnicodeStrings := aBoolean |
4339 | 3405 |
|
3406 |
"Modified (comment): / 09-02-2019 / 15:55:28 / Claus Gittinger" |
|
2307 | 3407 |
! |
3408 |
||
1634 | 3409 |
allowVariableReferences |
3410 |
^ allowVariableReferences |
|
3411 |
! |
|
3412 |
||
3413 |
allowVariableReferences:aBoolean |
|
4339 | 3414 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3415 |
||
1634 | 3416 |
allowVariableReferences := aBoolean. |
4339 | 3417 |
|
3418 |
"Modified (comment): / 09-02-2019 / 15:55:32 / Claus Gittinger" |
|
1634 | 3419 |
! |
3420 |
||
1655 | 3421 |
allowVisualAgeESSymbolLiterals |
3422 |
^ allowVisualAgeESSymbolLiterals |
|
3423 |
! |
|
3424 |
||
3425 |
allowVisualAgeESSymbolLiterals:aBoolean |
|
4339 | 3426 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
3427 |
||
1655 | 3428 |
allowVisualAgeESSymbolLiterals := aBoolean. |
4339 | 3429 |
|
3430 |
"Modified (comment): / 09-02-2019 / 15:55:35 / Claus Gittinger" |
|
1689 | 3431 |
! |
3432 |
||
3433 |
allowVisualAgePrimitives |
|
3434 |
"return true, if support for V'Age primitives is enabled." |
|
3435 |
||
3436 |
^ allowVisualAgePrimitives |
|
3437 |
! |
|
3438 |
||
3439 |
allowVisualAgePrimitives:aBoolean |
|
3440 |
"this allows turning on/off support for V'Age primitives" |
|
4339 | 3441 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
1689 | 3442 |
|
3443 |
allowVisualAgePrimitives := aBoolean |
|
4339 | 3444 |
|
3445 |
"Modified (comment): / 09-02-2019 / 15:55:39 / Claus Gittinger" |
|
1773 | 3446 |
! |
3447 |
||
3448 |
allowVisualWorksMethodAnnotations |
|
3449 |
"return true, if support for V'Works extended primitive syntax for method annotations." |
|
3450 |
||
3451 |
^ allowVisualWorksMethodAnnotations |
|
3452 |
||
3453 |
"Created: / 07-07-2006 / 15:48:30 / cg" |
|
3454 |
! |
|
3455 |
||
3456 |
allowVisualWorksMethodAnnotations:aBoolean |
|
3457 |
"turn on/off support for V'Works extended primitive syntax for method annotations." |
|
4339 | 3458 |
"attn: possibly sent via perform (Parser >> parsePragma)" |
1773 | 3459 |
|
3355 | 3460 |
allowVisualWorksMethodAnnotations := aBoolean |
1773 | 3461 |
|
3462 |
"Created: / 07-07-2006 / 15:49:03 / cg" |
|
4339 | 3463 |
"Modified (comment): / 09-02-2019 / 15:55:42 / Claus Gittinger" |
1658 | 3464 |
! ! |
1634 | 3465 |
|
1658 | 3466 |
!ParserFlags methodsFor:'accessing-warning-control'! |
1634 | 3467 |
|
1652 | 3468 |
warnAboutBadComments |
3469 |
^ warnAboutBadComments |
|
3470 |
! |
|
3471 |
||
3472 |
warnAboutBadComments:aBoolean |
|
3473 |
warnAboutBadComments := aBoolean. |
|
3474 |
! |
|
3475 |
||
1811 | 3476 |
warnAboutNonLowercaseLocalVariableNames |
3477 |
^ warnAboutNonLowercaseLocalVariableNames |
|
1740 | 3478 |
! |
3479 |
||
1811 | 3480 |
warnAboutNonLowercaseLocalVariableNames:aBoolean |
3481 |
warnAboutNonLowercaseLocalVariableNames := aBoolean. |
|
1740 | 3482 |
! |
3483 |
||
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3484 |
warnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3485 |
^ warnAboutPeriodInSymbol |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3486 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3487 |
|
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3488 |
warnAboutPeriodInSymbol:aBoolean |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3489 |
warnAboutPeriodInSymbol := aBoolean. |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3490 |
! |
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3491 |
|
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3492 |
warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3493 |
^ warnAboutPossibleSTCCompilationProblems |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3494 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3495 |
"Created: / 16-11-2006 / 14:24:38 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3496 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3497 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3498 |
warnAboutPossibleSTCCompilationProblems:aBoolean |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3499 |
warnAboutPossibleSTCCompilationProblems := aBoolean. |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3500 |
|
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3501 |
"Created: / 16-11-2006 / 14:24:40 / cg" |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3502 |
! |
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3503 |
|
2121 | 3504 |
warnAboutPossiblyUnimplementedSelectors |
3505 |
^ warnAboutPossiblyUnimplementedSelectors |
|
3506 |
! |
|
3507 |
||
3508 |
warnAboutPossiblyUnimplementedSelectors:aBoolean |
|
3509 |
warnAboutPossiblyUnimplementedSelectors := aBoolean. |
|
3510 |
! |
|
3511 |
||
4406 | 3512 |
warnAboutPossiblyUninitializedLocals |
3513 |
^ warnAboutPossiblyUninitializedLocals |
|
3514 |
||
3515 |
"Created: / 23-04-2019 / 23:09:55 / Claus Gittinger" |
|
3516 |
! |
|
3517 |
||
3518 |
warnAboutPossiblyUninitializedLocals:aBoolean |
|
3519 |
warnAboutPossiblyUninitializedLocals := aBoolean. |
|
3520 |
||
3521 |
"Created: / 23-04-2019 / 23:10:01 / Claus Gittinger" |
|
3522 |
! |
|
3523 |
||
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3524 |
warnAboutReferenceToPrivateClass |
3396 | 3525 |
"controls generation of warning messages when a private class is referenced" |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3526 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3527 |
^ warnAboutReferenceToPrivateClass |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3528 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3529 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3530 |
warnAboutReferenceToPrivateClass:aBoolean |
3396 | 3531 |
"controls generation of warning messages when a private class is referenced" |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3532 |
|
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3533 |
warnAboutReferenceToPrivateClass := aBoolean |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3534 |
! |
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3535 |
|
2079
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3536 |
warnAboutShortLocalVariableNames |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3537 |
^ warnAboutShortLocalVariableNames |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3538 |
! |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3539 |
|
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3540 |
warnAboutShortLocalVariableNames:aBoolean |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3541 |
warnAboutShortLocalVariableNames := aBoolean. |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3542 |
! |
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3543 |
|
2738 | 3544 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
2739 | 3545 |
^ warnAboutUnknownCharacterEscapesInJavaScriptStringConstant ? false |
2738 | 3546 |
|
3547 |
"Created: / 04-10-2011 / 19:51:19 / cg" |
|
3548 |
! |
|
3549 |
||
3550 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean |
|
3551 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean. |
|
3552 |
||
3553 |
"Created: / 04-10-2011 / 19:51:27 / cg" |
|
3554 |
! |
|
3555 |
||
1634 | 3556 |
warnAboutVariableNameConventions |
3557 |
^ warnAboutVariableNameConventions |
|
3558 |
! |
|
3559 |
||
3560 |
warnAboutVariableNameConventions:aBoolean |
|
3561 |
warnAboutVariableNameConventions := aBoolean. |
|
3562 |
! |
|
3563 |
||
3564 |
warnAboutWrongVariableNames |
|
3565 |
^ warnAboutWrongVariableNames |
|
3566 |
! |
|
3567 |
||
3568 |
warnAboutWrongVariableNames:aBoolean |
|
3569 |
warnAboutWrongVariableNames := aBoolean. |
|
3570 |
! |
|
3571 |
||
4437 | 3572 |
warnAssignmentToBlockArgument |
3573 |
^ warnAssignmentToBlockArgument |
|
3574 |
! |
|
3575 |
||
3576 |
warnAssignmentToBlockArgument:aBoolean |
|
3577 |
warnAssignmentToBlockArgument := aBoolean. |
|
3578 |
! |
|
3579 |
||
3580 |
warnAssignmentToMethodArgument |
|
3581 |
^ warnAssignmentToMethodArgument |
|
3582 |
! |
|
3583 |
||
3584 |
warnAssignmentToMethodArgument:aBoolean |
|
3585 |
warnAssignmentToMethodArgument := aBoolean. |
|
3586 |
! |
|
3587 |
||
3588 |
warnAssignmentToPoolVariable |
|
3589 |
^ warnAssignmentToPoolVariable |
|
3590 |
! |
|
3591 |
||
3592 |
warnAssignmentToPoolVariable:aBoolean |
|
3593 |
warnAssignmentToPoolVariable := aBoolean. |
|
3594 |
! |
|
3595 |
||
1634 | 3596 |
warnCommonMistakes |
3597 |
^ warnCommonMistakes |
|
3598 |
! |
|
3599 |
||
3600 |
warnCommonMistakes:aBoolean |
|
3601 |
warnCommonMistakes := aBoolean. |
|
3602 |
! |
|
3603 |
||
3604 |
warnDollarInIdentifier |
|
3605 |
^ warnDollarInIdentifier |
|
3606 |
! |
|
3607 |
||
3608 |
warnDollarInIdentifier:aBoolean |
|
3609 |
warnDollarInIdentifier := aBoolean. |
|
3610 |
! |
|
3611 |
||
1638 | 3612 |
warnHiddenVariables |
3613 |
^ warnHiddenVariables |
|
3614 |
! |
|
3615 |
||
3616 |
warnHiddenVariables:aBoolean |
|
2465 | 3617 |
"controls generation of warning messages about hiding variables by locals" |
3618 |
||
1638 | 3619 |
warnHiddenVariables := aBoolean. |
2465 | 3620 |
|
3621 |
"Modified: / 30-11-2010 / 15:00:55 / cg" |
|
1638 | 3622 |
! |
3623 |
||
1682 | 3624 |
warnInconsistentReturnValues |
3625 |
^ warnInconsistentReturnValues |
|
3626 |
! |
|
3627 |
||
3628 |
warnInconsistentReturnValues:aBoolean |
|
3629 |
warnInconsistentReturnValues := aBoolean. |
|
3630 |
! |
|
3631 |
||
1634 | 3632 |
warnOldStyleAssignment |
3633 |
^ warnOldStyleAssignment |
|
3634 |
! |
|
3635 |
||
3636 |
warnOldStyleAssignment:aBoolean |
|
3637 |
warnOldStyleAssignment := aBoolean. |
|
3638 |
! |
|
3639 |
||
4041 | 3640 |
warnParagraphInIdentifier |
3641 |
^ warnParagraphInIdentifier |
|
3642 |
||
3643 |
"Created: / 16-11-2016 / 22:29:33 / cg" |
|
3644 |
! |
|
3645 |
||
3646 |
warnParagraphInIdentifier:aBoolean |
|
3647 |
warnParagraphInIdentifier := aBoolean. |
|
3648 |
||
3649 |
"Created: / 16-11-2016 / 22:29:45 / cg" |
|
3650 |
! |
|
3651 |
||
2787 | 3652 |
warnPlausibilityChecks |
3653 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
3654 |
||
2789
3100327ad683
changed: #warnPlausibilityChecks
Claus Gittinger <cg@exept.de>
parents:
2787
diff
changeset
|
3655 |
^ warnPlausibilityChecks ? true |
2787 | 3656 |
|
3657 |
"Created: / 19-01-2012 / 10:38:54 / cg" |
|
3658 |
! |
|
3659 |
||
3660 |
warnPlausibilityChecks:aBoolean |
|
3661 |
"controls generation of warning messages about plausibility checks (possible precedence, etc.)" |
|
3662 |
||
3663 |
warnPlausibilityChecks := aBoolean |
|
3664 |
||
3665 |
"Created: / 19-01-2012 / 10:39:02 / cg" |
|
3666 |
! |
|
3667 |
||
1634 | 3668 |
warnPossibleIncompatibilities |
2057 | 3669 |
"holds true, if possible incompatibilities (with other ST systems) |
3670 |
are to be warned about" |
|
3671 |
||
1634 | 3672 |
^ warnPossibleIncompatibilities |
3673 |
! |
|
3674 |
||
3675 |
warnPossibleIncompatibilities:aBoolean |
|
2057 | 3676 |
"holds true, if possible incompatibilities (with other ST systems) |
3677 |
are to be warned about" |
|
3678 |
||
1634 | 3679 |
warnPossibleIncompatibilities := aBoolean. |
3680 |
! |
|
3681 |
||
3682 |
warnST80Directives |
|
3683 |
^ warnST80Directives |
|
3684 |
! |
|
3685 |
||
2476 | 3686 |
warnST80Directives:aBoolean |
3687 |
warnST80Directives := aBoolean. |
|
3688 |
||
3689 |
"Modified: / 30-01-2011 / 13:01:06 / cg" |
|
1634 | 3690 |
! |
3691 |
||
3692 |
warnSTXHereExtensionUsed |
|
3693 |
^ warnSTXHereExtensionUsed |
|
3694 |
! |
|
3695 |
||
3696 |
warnSTXHereExtensionUsed:aBoolean |
|
3697 |
warnSTXHereExtensionUsed := aBoolean. |
|
3698 |
! |
|
3699 |
||
3700 |
warnSTXNameSpaceUse |
|
3701 |
^ warnSTXNameSpaceUse |
|
3702 |
! |
|
3703 |
||
3704 |
warnSTXNameSpaceUse:aBoolean |
|
3705 |
warnSTXNameSpaceUse := aBoolean. |
|
3706 |
! |
|
3707 |
||
3708 |
warnSTXSpecialComment |
|
3709 |
^ warnSTXSpecialComment |
|
3710 |
! |
|
3711 |
||
3712 |
warnSTXSpecialComment:aBoolean |
|
3713 |
warnSTXSpecialComment := aBoolean. |
|
3714 |
! |
|
3715 |
||
3716 |
warnUndeclared |
|
3717 |
^ warnUndeclared |
|
3718 |
! |
|
3719 |
||
3720 |
warnUndeclared:aBoolean |
|
3721 |
warnUndeclared := aBoolean. |
|
3722 |
! |
|
3723 |
||
3724 |
warnUnderscoreInIdentifier |
|
3725 |
^ warnUnderscoreInIdentifier |
|
3726 |
! |
|
3727 |
||
3728 |
warnUnderscoreInIdentifier:aBoolean |
|
3729 |
warnUnderscoreInIdentifier := aBoolean. |
|
3730 |
! |
|
3731 |
||
3732 |
warnUnusedVars |
|
3733 |
^ warnUnusedVars |
|
3734 |
! |
|
3735 |
||
3736 |
warnUnusedVars:aBoolean |
|
3737 |
warnUnusedVars := aBoolean. |
|
1662 | 3738 |
! |
3739 |
||
3740 |
warnings |
|
2477 | 3741 |
^ warnings ? true |
3742 |
||
3743 |
"Modified: / 30-01-2011 / 13:05:48 / cg" |
|
1662 | 3744 |
! |
3745 |
||
2476 | 3746 |
warnings:aBoolean |
3747 |
warnings := aBoolean. |
|
3748 |
||
3749 |
"Modified: / 30-01-2011 / 13:00:51 / cg" |
|
1634 | 3750 |
! ! |
3751 |
||
3752 |
!ParserFlags methodsFor:'initialization'! |
|
3753 |
||
3754 |
initialize |
|
3220 | 3755 |
"each instance is initially setup from the classes global defaults. |
3756 |
(but can be changed as required for an individual compilation run" |
|
3757 |
||
4421 | 3758 |
singlePrecisionFloatF := SinglePrecisionFloatF. |
3759 |
||
1662 | 3760 |
warnings := Warnings. |
1634 | 3761 |
warnUndeclared := WarnUndeclared. |
3762 |
warnUnusedVars := WarnUnusedVars. |
|
3763 |
warnST80Directives := WarnST80Directives. |
|
3764 |
warnSTXSpecialComment := WarnSTXSpecials. |
|
3765 |
warnSTXNameSpaceUse := WarnSTXSpecials. |
|
3766 |
warnSTXHereExtensionUsed := WarnSTXSpecials. |
|
3767 |
warnUnderscoreInIdentifier := WarnUnderscoreInIdentifier. |
|
3768 |
warnDollarInIdentifier := WarnDollarInIdentifier. |
|
4041 | 3769 |
warnParagraphInIdentifier := WarnParagraphInIdentifier. |
1634 | 3770 |
warnOldStyleAssignment := WarnOldStyleAssignment. |
3771 |
warnCommonMistakes := WarnCommonMistakes. |
|
3772 |
warnPossibleIncompatibilities := WarnPossibleIncompatibilities. |
|
3773 |
warnAboutVariableNameConventions := WarnAboutVariableNameConventions. |
|
3774 |
warnAboutWrongVariableNames := WarnAboutWrongVariableNames. |
|
1652 | 3775 |
warnAboutBadComments := WarnAboutBadComments. |
2073
efd507565894
+warnAboutReferenceToPrivateClass
Claus Gittinger <cg@exept.de>
parents:
2061
diff
changeset
|
3776 |
warnAboutReferenceToPrivateClass := WarnAboutReferenceToPrivateClass. |
4406 | 3777 |
warnAboutPossiblyUninitializedLocals := WarnAboutPossiblyUninitializedLocals. |
1638 | 3778 |
warnHiddenVariables := WarnHiddenVariables. |
1682 | 3779 |
warnInconsistentReturnValues := WarnInconsistentReturnValues. |
1811 | 3780 |
warnAboutNonLowercaseLocalVariableNames := WarnAboutNonLowercaseLocalVariableNames. |
2079
0625ff661e53
+warnAboutShortVariableNames
Claus Gittinger <cg@exept.de>
parents:
2073
diff
changeset
|
3781 |
warnAboutShortLocalVariableNames := WarnAboutShortLocalVariableNames. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3782 |
warnAboutPossibleSTCCompilationProblems := WarnAboutPossibleSTCCompilationProblems. |
2121 | 3783 |
warnAboutPossiblyUnimplementedSelectors := WarnAboutPossiblyUnimplementedSelectors. |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3784 |
warnAboutPeriodInSymbol := WarnAboutPeriodInSymbol. |
2738 | 3785 |
warnAboutUnknownCharacterEscapesInJavaScriptStringConstant := WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant. |
2787 | 3786 |
warnPlausibilityChecks := WarnPlausibilityChecks. |
3220 | 3787 |
warnAssignmentToBlockArgument := WarnAssignmentToBlockArgument. |
3788 |
warnAssignmentToMethodArgument := WarnAssignmentToMethodArgument. |
|
3396 | 3789 |
warnAssignmentToPoolVariable := WarnAssignmentToPoolVariable. |
1634 | 3790 |
|
4487 | 3791 |
allowSTXExtensions := AllowSTXExtensions. |
1634 | 3792 |
allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier. |
3793 |
allowDollarInIdentifier := AllowDollarInIdentifier. |
|
4041 | 3794 |
allowParagraphInIdentifier := AllowParagraphInIdentifier. |
1634 | 3795 |
allowOldStyleAssignment := AllowOldStyleAssignment. |
3796 |
allowSqueakExtensions := AllowSqueakExtensions. |
|
3797 |
allowDolphinExtensions := AllowDolphinExtensions. |
|
3798 |
allowLiteralNameSpaceSymbols := AllowLiteralNameSpaceSymbols. |
|
3799 |
allowExtendedBinarySelectors := AllowExtendedBinarySelectors. |
|
2306 | 3800 |
allowCaretAsBinop := AllowCaretAsBinop. |
1634 | 3801 |
allowFunctionCallSyntaxForBlockEvaluation := AllowFunctionCallSyntaxForBlockEvaluation. |
3802 |
allowLocalVariableDeclarationWithInitializerExpression := AllowLocalVariableDeclarationWithInitializerExpression. |
|
3803 |
allowDomainVariables := AllowDomainVariables. |
|
3804 |
allowArrayIndexSyntaxExtension := AllowArrayIndexSyntaxExtension. |
|
3805 |
allowReservedWordsAsSelectors := AllowReservedWordsAsSelectors. |
|
3806 |
allowVariableReferences := AllowVariableReferences. |
|
3807 |
allowLazyValueExtension := AllowLazyValueExtension. |
|
3808 |
allowFixedPointLiterals := AllowFixedPointLiterals. |
|
3809 |
allowExtendedSTXSyntax := AllowExtendedSTXSyntax. |
|
3810 |
allowQualifiedNames := AllowQualifiedNames. |
|
1655 | 3811 |
allowVisualAgeESSymbolLiterals := AllowVisualAgeESSymbolLiterals. |
1668 | 3812 |
allowExtensionsToPrivateClasses := AllowExtensionsToPrivateClasses. |
1689 | 3813 |
allowVisualAgePrimitives := AllowVisualAgePrimitives. |
3814 |
allowSqueakPrimitives := AllowSqueakPrimitives. |
|
1700 | 3815 |
allowSTVPrimitives := AllowSTVPrimitives. |
1702 | 3816 |
allowSTVExtensions := AllowSTVExtensions. |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3817 |
allowNationalCharactersInIdentifier := AllowNationalCharactersInIdentifier. |
4436 | 3818 |
allowGreekCharactersInIdentifier := AllowGreekCharactersInIdentifier. |
1706
685cea395a8c
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1704
diff
changeset
|
3819 |
allowHashAsBinarySelector := AllowHashAsBinarySelector. |
1708
eb71a302895e
more support for filein of ST/V code
Claus Gittinger <cg@exept.de>
parents:
1706
diff
changeset
|
3820 |
allowSTXEOLComments := AllowSTXEOLComments. |
2984 | 3821 |
allowSTXDelimiterComments := AllowSTXDelimiterComments. |
3947 | 3822 |
allowSTXExtendedArrayLiterals := AllowSTXExtendedArrayLiterals. |
1773 | 3823 |
allowVisualWorksMethodAnnotations := AllowVisualWorksMethodAnnotations. |
1947
a5429732842a
warn/allow stc-uncompilable code.
Claus Gittinger <cg@exept.de>
parents:
1940
diff
changeset
|
3824 |
allowPossibleSTCCompilationProblems := AllowPossibleSTCCompilationProblems. |
1950 | 3825 |
allowEmptyStatements := AllowEmptyStatements. |
2179
5ccb29e1233a
allowPeriodInSymbol - to read old st80/squeak code
Claus Gittinger <cg@exept.de>
parents:
2145
diff
changeset
|
3826 |
allowPeriodInSymbol := AllowPeriodInSymbol. |
4301 | 3827 |
allowPeriodAsNameSpaceSeparator := AllowPeriodAsNameSpaceSeparator. |
3828 |
||
2311 | 3829 |
"/ these are only supported in the new compiler |
4478 | 3830 |
allowCIntegers := AllowCIntegers. |
4333 | 3831 |
allowCStrings := AllowCStrings. |
4412 | 3832 |
allowEStrings := AllowEStrings. |
4430 | 3833 |
allowRStrings := AllowRStrings. |
2307 | 3834 |
allowUnicodeStrings := AllowUnicodeStrings. |
2310 | 3835 |
allowUnicodeCharacters := AllowUnicodeCharacters. |
2311 | 3836 |
allowCharacterEscapes := AllowCharacterEscapes. |
2313 | 3837 |
allowStringEscapes := AllowStringEscapes. |
2685 | 3838 |
allowAssignmentToBlockArgument := AllowAssignmentToBlockArgument. |
3839 |
allowAssignmentToMethodArgument := AllowAssignmentToMethodArgument. |
|
3840 |
allowAssignmentToPoolVariable := AllowAssignmentToPoolVariable. |
|
4085 | 3841 |
allowSignedByteArrayElements := AllowSignedByteArrayElements. |
4149 | 3842 |
allowSymbolsStartingWithDigit := AllowSymbolsStartingWithDigit. |
4485 | 3843 |
allowInlineObjects := AllowInlineObjects. |
4185 | 3844 |
|
3845 |
allowJavaScriptConst := AllowJavaScriptConst. |
|
4149 | 3846 |
|
1634 | 3847 |
arraysAreImmutable := ArraysAreImmutable ? true. |
3848 |
stringsAreImmutable := StringsAreImmutable ? true. |
|
3849 |
implicitSelfSends := ImplicitSelfSends ? false. |
|
2929 | 3850 |
lineNumberInfo := LineNumberInfo ? false. |
1634 | 3851 |
|
1658 | 3852 |
stcKeepCIntermediate := STCKeepCIntermediate. |
3853 |
stcKeepOIntermediate := STCKeepOIntermediate. |
|
3854 |
stcKeepSTIntermediate := STCKeepSTIntermediate. |
|
3855 |
stcModulePath := STCModulePath. |
|
3856 |
stcCompilation := STCCompilation. |
|
3857 |
stcCompilationIncludes := STCCompilationIncludes. |
|
3858 |
stcCompilationDefines := STCCompilationDefines. |
|
3859 |
stcCompilationOptions := STCCompilationOptions. |
|
3860 |
stcPath := STCPath. |
|
3861 |
ccCompilationOptions := CCCompilationOptions. |
|
3862 |
ccPath := CCPath. |
|
3863 |
linkArgs := LinkArgs. |
|
3864 |
linkCommand := LinkCommand. |
|
3865 |
libPath := LibPath. |
|
3866 |
searchedLibraries := SearchedLibraries. |
|
3867 |
||
1634 | 3868 |
" |
3869 |
ParserFlags initialize. |
|
3870 |
self new inspect. |
|
3871 |
" |
|
1773 | 3872 |
|
4185 | 3873 |
"Modified: / 08-08-2017 / 23:50:01 / cg" |
4436 | 3874 |
"Modified: / 08-06-2019 / 14:53:04 / Claus Gittinger" |
1634 | 3875 |
! ! |
3876 |
||
3877 |
!ParserFlags class methodsFor:'documentation'! |
|
3878 |
||
3879 |
version |
|
3653 | 3880 |
^ '$Header$' |
2218
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
3881 |
! |
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
3882 |
|
51ac45ab36a2
changed: #allowExtendedBinarySelectors
Claus Gittinger <cg@exept.de>
parents:
2179
diff
changeset
|
3883 |
version_CVS |
3653 | 3884 |
^ '$Header$' |
1634 | 3885 |
! ! |
3886 |
||
3009
4dea425c9718
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
2984
diff
changeset
|
3887 |
|
1634 | 3888 |
ParserFlags initialize! |