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