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