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