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