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