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