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