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