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