1634
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1989 by Claus Gittinger
|
|
3 |
COPYRIGHT (c) 2005 by eXept Software AG
|
|
4 |
All Rights Reserved
|
|
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 |
|
|
14 |
"{ Package: 'stx:libcomp' }"
|
|
15 |
|
|
16 |
Object subclass:#ParserFlags
|
|
17 |
instanceVariableNames:'warnUnusedVars warnUndeclared warnST80Directives
|
|
18 |
warnSTXHereExtensionUsed warnSTXSpecialComment
|
|
19 |
warnUnderscoreInIdentifier warnOldStyleAssignment
|
|
20 |
warnCommonMistakes warnSTXNameSpaceUse
|
|
21 |
warnPossibleIncompatibilities warnDollarInIdentifier
|
1638
|
22 |
warnHiddenVariables warnAboutVariableNameConventions
|
1652
|
23 |
warnAboutWrongVariableNames warnAboutBadComments
|
|
24 |
allowLiteralNameSpaceSymbols allowUnderscoreInIdentifier
|
|
25 |
allowDollarInIdentifier allowOldStyleAssignment
|
|
26 |
allowSqueakExtensions allowDolphinExtensions
|
|
27 |
allowExtendedBinarySelectors allowQualifiedNames
|
|
28 |
allowFunctionCallSyntaxForBlockEvaluation
|
1634
|
29 |
allowLocalVariableDeclarationWithInitializerExpression
|
|
30 |
allowDomainVariables allowArrayIndexSyntaxExtension
|
|
31 |
allowReservedWordsAsSelectors allowVariableReferences
|
|
32 |
allowLazyValueExtension allowFixedPointLiterals
|
1655
|
33 |
allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals
|
1658
|
34 |
arraysAreImmutable stringsAreImmutable implicitSelfSends
|
|
35 |
stcKeepCIntermediate stcKeepOIntermediate stcKeepSTIntermediate
|
|
36 |
stcModulePath stcCompilation stcCompilationIncludes
|
|
37 |
stcCompilationDefines stcCompilationOptions stcPath
|
|
38 |
ccCompilationOptions ccPath linkArgs linkCommand libPath
|
|
39 |
searchedLibraries'
|
1634
|
40 |
classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared
|
1652
|
41 |
WarnAboutWrongVariableNames WarnAboutBadComments
|
|
42 |
WarnAboutVariableNameConventions WarnSTXSpecials
|
|
43 |
WarnOldStyleAssignment WarnUnderscoreInIdentifier
|
1634
|
44 |
WarnCommonMistakes WarnPossibleIncompatibilities
|
1638
|
45 |
WarnDollarInIdentifier WarnHiddenVariables Warnings
|
|
46 |
AllowUnderscoreInIdentifier
|
1634
|
47 |
AllowFunctionCallSyntaxForBlockEvaluation AllowLazyValueExtension
|
|
48 |
AllowVariableReferences AllowReservedWordsAsSelectors
|
|
49 |
AllowLocalVariableDeclarationWithInitializerExpression
|
|
50 |
AllowArrayIndexSyntaxExtension AllowDomainVariables
|
|
51 |
AllowDollarInIdentifier AllowSqueakExtensions AllowQualifiedNames
|
|
52 |
AllowDolphinExtensions AllowOldStyleAssignment
|
|
53 |
AllowExtendedBinarySelectors AllowExtendedSTXSyntax
|
|
54 |
AllowFixedPointLiterals AllowLiteralNameSpaceSymbols
|
1655
|
55 |
ArraysAreImmutable StringsAreImmutable ImplicitSelfSends
|
1658
|
56 |
AllowVisualAgeESSymbolLiterals STCModulePath STCKeepCIntermediate
|
|
57 |
STCKeepOIntermediate STCKeepSTIntermediate STCCompilation
|
|
58 |
STCCompilationIncludes STCCompilationDefines
|
|
59 |
STCCompilationOptions STCPath CCCompilationOptions CCPath
|
|
60 |
LinkArgs LinkCommand LibPath SearchedLibraries'
|
1634
|
61 |
poolDictionaries:''
|
|
62 |
category:'System-Compiler'
|
|
63 |
!
|
|
64 |
|
|
65 |
!ParserFlags class methodsFor:'documentation'!
|
|
66 |
|
|
67 |
copyright
|
|
68 |
"
|
|
69 |
COPYRIGHT (c) 1989 by Claus Gittinger
|
|
70 |
COPYRIGHT (c) 2005 by eXept Software AG
|
|
71 |
All Rights Reserved
|
|
72 |
|
|
73 |
This software is furnished under a license and may be used
|
|
74 |
only in accordance with the terms of that license and with the
|
|
75 |
inclusion of the above copyright notice. This software may not
|
|
76 |
be provided or otherwise made available to, or used by, any
|
|
77 |
other person. No title to or ownership of the software is
|
|
78 |
hereby transferred.
|
|
79 |
"
|
|
80 |
!
|
|
81 |
|
|
82 |
documentation
|
|
83 |
"
|
|
84 |
compiler flags (used to be defined in Scanner and Parser) have been extracted for easier
|
|
85 |
individual-method customization (using ST as scripting).
|
|
86 |
"
|
|
87 |
! !
|
|
88 |
|
|
89 |
!ParserFlags class methodsFor:'instance creation'!
|
|
90 |
|
|
91 |
new
|
|
92 |
^ self basicNew initialize
|
|
93 |
! !
|
|
94 |
|
|
95 |
!ParserFlags class methodsFor:'accessing-compilation control'!
|
|
96 |
|
|
97 |
arraysAreImmutable
|
|
98 |
"return true if arrays are immutable literals"
|
|
99 |
|
|
100 |
^ ArraysAreImmutable
|
|
101 |
!
|
|
102 |
|
|
103 |
arraysAreImmutable:aBoolean
|
|
104 |
"turn on/off immutable array literals - default is false for ST-80 compatibilty."
|
|
105 |
|
|
106 |
ArraysAreImmutable := aBoolean.
|
|
107 |
|
|
108 |
"
|
|
109 |
can be added to your private.rc file:
|
|
110 |
|
|
111 |
ParserFlags arraysAreImmutable:true
|
|
112 |
ParserFlags arraysAreImmutable:false
|
|
113 |
"
|
|
114 |
!
|
|
115 |
|
|
116 |
implicitSelfSends
|
|
117 |
"return true if undefined variables with
|
|
118 |
lowercase first character are to be turned
|
|
119 |
into implicit self sends"
|
|
120 |
|
|
121 |
^ ImplicitSelfSends
|
|
122 |
!
|
|
123 |
|
|
124 |
implicitSelfSends:aBoolean
|
|
125 |
"turn on/off implicit self sends"
|
|
126 |
|
|
127 |
ImplicitSelfSends := aBoolean
|
|
128 |
|
|
129 |
"
|
|
130 |
Compiler implicitSelfSends:true
|
|
131 |
Compiler implicitSelfSends:false
|
|
132 |
"
|
|
133 |
!
|
|
134 |
|
|
135 |
stringsAreImmutable
|
|
136 |
"return true if strings are immutable literals"
|
|
137 |
|
|
138 |
^ StringsAreImmutable
|
|
139 |
|
|
140 |
"Created: / 3.8.1998 / 14:53:25 / cg"
|
|
141 |
!
|
|
142 |
|
|
143 |
stringsAreImmutable:aBoolean
|
|
144 |
"turn on/off immutable string literals - default is false for ST-80 compatibilty."
|
|
145 |
|
|
146 |
StringsAreImmutable := aBoolean.
|
|
147 |
|
|
148 |
"
|
|
149 |
can be added to your private.rc file:
|
|
150 |
|
|
151 |
ParserFlags stringsAreImmutable:true
|
|
152 |
ParserFlags stringsAreImmutable:false
|
|
153 |
"
|
|
154 |
|
|
155 |
"Created: / 3.8.1998 / 14:53:28 / cg"
|
|
156 |
! !
|
|
157 |
|
1658
|
158 |
!ParserFlags class methodsFor:'accessing-stc compilation control'!
|
|
159 |
|
|
160 |
ccCompilationOptions
|
|
161 |
^ CCCompilationOptions
|
|
162 |
!
|
|
163 |
|
|
164 |
ccCompilationOptions:aString
|
|
165 |
CCCompilationOptions := aString
|
|
166 |
!
|
|
167 |
|
|
168 |
ccPath
|
|
169 |
^ CCPath
|
|
170 |
!
|
|
171 |
|
|
172 |
ccPath:aSymbol
|
|
173 |
CCPath := aSymbol
|
|
174 |
!
|
|
175 |
|
|
176 |
libPath
|
|
177 |
^ LibPath
|
|
178 |
!
|
|
179 |
|
|
180 |
libPath:aString
|
|
181 |
LibPath := aString
|
|
182 |
!
|
|
183 |
|
|
184 |
linkArgs
|
|
185 |
^ LinkArgs
|
|
186 |
!
|
|
187 |
|
|
188 |
linkArgs:aString
|
|
189 |
LinkArgs := aString
|
|
190 |
!
|
|
191 |
|
|
192 |
linkCommand
|
|
193 |
^ LinkCommand
|
|
194 |
!
|
|
195 |
|
|
196 |
linkCommand:aString
|
|
197 |
LinkCommand := aString
|
|
198 |
!
|
|
199 |
|
|
200 |
searchedLibraries
|
|
201 |
^ SearchedLibraries
|
|
202 |
!
|
|
203 |
|
|
204 |
searchedLibraries:aString
|
|
205 |
SearchedLibraries := aString
|
|
206 |
!
|
|
207 |
|
|
208 |
stcCompilation
|
|
209 |
^ STCCompilation
|
|
210 |
!
|
|
211 |
|
|
212 |
stcCompilation:aSymbol
|
|
213 |
STCCompilation := aSymbol
|
|
214 |
!
|
|
215 |
|
|
216 |
stcCompilationDefines
|
|
217 |
^ STCCompilationDefines
|
|
218 |
!
|
|
219 |
|
|
220 |
stcCompilationDefines:aString
|
|
221 |
STCCompilationDefines := aString
|
|
222 |
!
|
|
223 |
|
|
224 |
stcCompilationIncludes
|
|
225 |
^ STCCompilationIncludes
|
|
226 |
!
|
|
227 |
|
|
228 |
stcCompilationIncludes:aString
|
|
229 |
STCCompilationIncludes := aString
|
|
230 |
!
|
|
231 |
|
|
232 |
stcCompilationOptions
|
|
233 |
^ STCCompilationOptions
|
|
234 |
!
|
|
235 |
|
|
236 |
stcCompilationOptions:aString
|
|
237 |
STCCompilationOptions := aString
|
|
238 |
!
|
|
239 |
|
|
240 |
stcKeepCIntermediate
|
|
241 |
^ STCKeepCIntermediate
|
|
242 |
!
|
|
243 |
|
|
244 |
stcKeepCIntermediate:something
|
|
245 |
STCKeepCIntermediate := something.
|
|
246 |
!
|
|
247 |
|
|
248 |
stcKeepOIntermediate
|
|
249 |
^ STCKeepOIntermediate
|
|
250 |
!
|
|
251 |
|
|
252 |
stcKeepOIntermediate:something
|
|
253 |
STCKeepOIntermediate := something.
|
|
254 |
!
|
|
255 |
|
|
256 |
stcKeepSTIntermediate
|
|
257 |
^ STCKeepSTIntermediate
|
|
258 |
!
|
|
259 |
|
|
260 |
stcKeepSTIntermediate:something
|
|
261 |
STCKeepSTIntermediate := something.
|
|
262 |
!
|
|
263 |
|
|
264 |
stcModulePath
|
|
265 |
^ STCModulePath
|
|
266 |
!
|
|
267 |
|
|
268 |
stcModulePath:something
|
|
269 |
STCModulePath := something.
|
|
270 |
!
|
|
271 |
|
|
272 |
stcPath
|
|
273 |
^ STCPath
|
|
274 |
!
|
|
275 |
|
|
276 |
stcPath:aSymbol
|
|
277 |
STCPath := aSymbol
|
|
278 |
!
|
|
279 |
|
|
280 |
withSTCCompilation:howSymbol do:aBlock
|
|
281 |
|prev|
|
|
282 |
|
|
283 |
prev := self stcCompilation.
|
|
284 |
self stcCompilation:howSymbol.
|
|
285 |
aBlock ensure:[ self stcCompilation:prev ]
|
|
286 |
! !
|
|
287 |
|
1634
|
288 |
!ParserFlags class methodsFor:'accessing-syntax-control'!
|
|
289 |
|
|
290 |
allowArrayIndexSyntaxExtension
|
|
291 |
"experimental"
|
|
292 |
|
|
293 |
^ AllowArrayIndexSyntaxExtension ? false
|
|
294 |
!
|
|
295 |
|
|
296 |
allowArrayIndexSyntaxExtension:aBoolean
|
|
297 |
"experimental"
|
|
298 |
|
|
299 |
AllowArrayIndexSyntaxExtension := aBoolean.
|
|
300 |
|
|
301 |
"
|
|
302 |
self allowArrayIndexSyntaxExtension:true
|
|
303 |
self allowArrayIndexSyntaxExtension:false
|
|
304 |
"
|
|
305 |
!
|
|
306 |
|
|
307 |
allowDollarInIdentifier
|
|
308 |
"return true, if $-characters are allowed in identifiers.
|
|
309 |
Notice, that dollars are NEVER allowed as the first character in an identifier."
|
|
310 |
|
|
311 |
^ AllowDollarInIdentifier
|
|
312 |
|
|
313 |
"Created: 7.9.1997 / 01:32:18 / cg"
|
|
314 |
"Modified: 7.9.1997 / 01:39:44 / cg"
|
|
315 |
!
|
|
316 |
|
|
317 |
allowDollarInIdentifier:aBoolean
|
|
318 |
"this allows turning on/off $-characters in identifiers.
|
|
319 |
Notice, that dollars are NEVER allowed as the first character in an identifier.
|
|
320 |
If turned off (the default), dollars are not allowed in identifiers,
|
|
321 |
but instead are scanned as character-constant prefix.
|
|
322 |
If turned on, dollars are in identifiers are allowed, while extra
|
|
323 |
dollars are still scanned as constant character prefix.
|
|
324 |
If you have to fileIn old VW-Vsn2.x classes, turn this off
|
|
325 |
before filing them in; i.e.:
|
|
326 |
Compiler allowDollarInIdentifiers:false"
|
|
327 |
|
|
328 |
AllowDollarInIdentifier := aBoolean.
|
|
329 |
|
|
330 |
"Created: 7.9.1997 / 01:34:49 / cg"
|
|
331 |
"Modified: 7.9.1997 / 01:39:30 / cg"
|
|
332 |
!
|
|
333 |
|
|
334 |
allowDolphinExtensions
|
|
335 |
"return true, if ##(..) computed literals are allowed"
|
|
336 |
|
|
337 |
^ AllowDolphinExtensions
|
|
338 |
!
|
|
339 |
|
|
340 |
allowDolphinExtensions:aBoolean
|
|
341 |
"this allows turning on/off support for computed arrays ##(..) as in dolphin.
|
|
342 |
If you want to fileIn Dolphin classes, enable this with:
|
|
343 |
Compiler allowDolphinComputedArrays:true"
|
|
344 |
|
|
345 |
AllowDolphinExtensions := aBoolean.
|
|
346 |
|
|
347 |
"
|
|
348 |
self allowDolphinExtensions:true
|
|
349 |
self allowDolphinExtensions:false
|
|
350 |
"
|
|
351 |
!
|
|
352 |
|
|
353 |
allowFunctionCallSyntaxForBlockEvaluation
|
|
354 |
"experimental"
|
|
355 |
|
|
356 |
^ AllowFunctionCallSyntaxForBlockEvaluation
|
|
357 |
!
|
|
358 |
|
|
359 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean
|
|
360 |
"experimental"
|
|
361 |
|
|
362 |
AllowFunctionCallSyntaxForBlockEvaluation := aBoolean.
|
|
363 |
!
|
|
364 |
|
|
365 |
allowLiteralNameSpaceSymbols
|
|
366 |
"return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed"
|
|
367 |
|
|
368 |
^ AllowLiteralNameSpaceSymbols
|
|
369 |
!
|
|
370 |
|
|
371 |
allowLiteralNameSpaceSymbols:aBoolean
|
|
372 |
"controls, if literal nameSpace symbols are allowed (#foo::bar) are allowed"
|
|
373 |
|
|
374 |
AllowLiteralNameSpaceSymbols := aBoolean
|
|
375 |
!
|
|
376 |
|
|
377 |
allowLocalVariableDeclarationWithInitializerExpression
|
|
378 |
"experimental"
|
|
379 |
|
|
380 |
^ AllowLocalVariableDeclarationWithInitializerExpression
|
|
381 |
!
|
|
382 |
|
|
383 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean
|
|
384 |
"experimental"
|
|
385 |
|
|
386 |
AllowLocalVariableDeclarationWithInitializerExpression := aBoolean.
|
|
387 |
!
|
|
388 |
|
|
389 |
allowOldStyleAssignment
|
|
390 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be allowed"
|
|
391 |
|
|
392 |
^ AllowOldStyleAssignment
|
|
393 |
!
|
|
394 |
|
|
395 |
allowOldStyleAssignment:aBoolean
|
|
396 |
"this allows turning on/off recognition of underscore-assignment (pre ST-80v4 syntax).
|
|
397 |
You must turn this off, if code with variables named '_' is to be filedIn"
|
|
398 |
|
|
399 |
AllowOldStyleAssignment := aBoolean
|
|
400 |
!
|
|
401 |
|
|
402 |
allowQualifiedNames
|
|
403 |
"return true, if #{..} qualified names are allowed"
|
|
404 |
|
|
405 |
^ AllowQualifiedNames
|
|
406 |
!
|
|
407 |
|
|
408 |
allowQualifiedNames:aBoolean
|
|
409 |
"this allows turning on/off support for qualifiedNames #{ .., } as in vw3.
|
|
410 |
If you want to fileIn vw3 or later classes, enable this with:
|
|
411 |
Compiler allowQualifiedNames:true
|
|
412 |
Notice, that qualified names are not really supported semantically
|
|
413 |
(they are parsed, but treated like regular globals)
|
|
414 |
"
|
|
415 |
|
|
416 |
AllowQualifiedNames := aBoolean.
|
|
417 |
|
|
418 |
"
|
|
419 |
self allowQualifiedNames:true
|
|
420 |
self allowQualifiedNames:false
|
|
421 |
"
|
|
422 |
!
|
|
423 |
|
|
424 |
allowReservedWordsAsSelectors
|
|
425 |
"return true, if self, super, thisContext, nil, true and false are to be allowed
|
|
426 |
as unary message selectors."
|
|
427 |
|
|
428 |
^ AllowReservedWordsAsSelectors ? false
|
|
429 |
!
|
|
430 |
|
|
431 |
allowReservedWordsAsSelectors:aBoolean
|
|
432 |
"enable/disable, if self, super, thisContext, nil, true and false are to be allowed
|
|
433 |
as unary message selectors."
|
|
434 |
|
|
435 |
AllowReservedWordsAsSelectors := aBoolean.
|
|
436 |
|
|
437 |
"
|
|
438 |
self allowReservedWordsAsSelectors:true
|
|
439 |
self allowReservedWordsAsSelectors:false
|
|
440 |
"
|
|
441 |
!
|
|
442 |
|
|
443 |
allowSqueakExtensions
|
|
444 |
"return true, if support for squeak extensions
|
|
445 |
computed arrays { .., }
|
|
446 |
c/java style arguments in message sends rec foo(arg1, ... argN)
|
|
447 |
is enabled."
|
|
448 |
|
|
449 |
^ AllowSqueakExtensions
|
|
450 |
!
|
|
451 |
|
|
452 |
allowSqueakExtensions:aBoolean
|
|
453 |
"this allows turning on/off support for squeak extensions:
|
|
454 |
computed arrays { .., }
|
|
455 |
c/java style arguments in message sends rec foo(arg1, ... argN)
|
|
456 |
|
|
457 |
If you want to fileIn Squeak classes, enable this with:
|
|
458 |
Compiler allowSqueakComputedArrays:true"
|
|
459 |
|
|
460 |
AllowSqueakExtensions := aBoolean.
|
|
461 |
|
|
462 |
"
|
|
463 |
self allowSqueakExtensions:true
|
|
464 |
self allowSqueakExtensions:false
|
|
465 |
"
|
|
466 |
!
|
|
467 |
|
|
468 |
allowUnderscoreInIdentifier
|
|
469 |
"return true, if underscores are allowed in identifiers"
|
|
470 |
|
|
471 |
^ AllowUnderscoreInIdentifier
|
|
472 |
!
|
|
473 |
|
|
474 |
allowUnderscoreInIdentifier:aBoolean
|
|
475 |
"this allows turning on/off underscores in identifiers.
|
|
476 |
If turned off (the default), underscores are not allowed in identifiers,
|
|
477 |
but instead scanned as assignment character (old ST/80 syntax).
|
|
478 |
If turned on, underscores are in identifiers are allowed, while extra
|
|
479 |
underscores are still scanned as assignment.
|
|
480 |
If you have to fileIn old VW-Vsn2.x classes,
|
|
481 |
turn them off with:
|
|
482 |
Compiler allowUnderscoreInIdentifiers:false"
|
|
483 |
|
|
484 |
AllowUnderscoreInIdentifier := aBoolean.
|
|
485 |
|
|
486 |
"Modified: 7.9.1997 / 01:35:19 / cg"
|
1655
|
487 |
!
|
|
488 |
|
|
489 |
allowVisualAgeESSymbolLiterals
|
|
490 |
"return true, if ##symbols are allowed (treated like symbols)"
|
|
491 |
|
|
492 |
^ AllowVisualAgeESSymbolLiterals
|
|
493 |
!
|
|
494 |
|
|
495 |
allowVisualAgeESSymbolLiterals:aBoolean
|
|
496 |
"if on, visualAge's ##symbols are allowed (treated like symbols)"
|
|
497 |
|
|
498 |
AllowVisualAgeESSymbolLiterals := aBoolean.
|
1634
|
499 |
! !
|
|
500 |
|
|
501 |
!ParserFlags class methodsFor:'accessing-warning-control'!
|
|
502 |
|
1652
|
503 |
warnAboutBadComments
|
|
504 |
"controls generation of warning messages about empty comments"
|
|
505 |
|
|
506 |
^ WarnAboutBadComments
|
|
507 |
!
|
|
508 |
|
|
509 |
warnAboutBadComments:aBoolean
|
|
510 |
"controls generation of warning messages about empty comments"
|
|
511 |
|
|
512 |
WarnAboutBadComments := aBoolean
|
|
513 |
!
|
|
514 |
|
1634
|
515 |
warnAboutVariableNameConventions
|
|
516 |
"controls generation of warning messages about wrong variable names"
|
|
517 |
|
|
518 |
^ WarnAboutVariableNameConventions
|
|
519 |
!
|
|
520 |
|
|
521 |
warnAboutVariableNameConventions:aBoolean
|
|
522 |
"controls generation of warning messages about wrong variable names"
|
|
523 |
|
|
524 |
WarnAboutVariableNameConventions := aBoolean
|
|
525 |
!
|
|
526 |
|
|
527 |
warnAboutWrongVariableNames
|
|
528 |
"controls generation of warning messages about wrong variable names"
|
|
529 |
|
|
530 |
^ WarnAboutWrongVariableNames
|
|
531 |
!
|
|
532 |
|
|
533 |
warnAboutWrongVariableNames:aBoolean
|
|
534 |
"controls generation of warning messages about wrong variable names"
|
|
535 |
|
|
536 |
WarnAboutWrongVariableNames := aBoolean
|
|
537 |
!
|
|
538 |
|
|
539 |
warnCommonMistakes
|
|
540 |
"return true, if common beginners mistakes are to be warned about"
|
|
541 |
|
|
542 |
^ Warnings and:[WarnCommonMistakes]
|
|
543 |
!
|
|
544 |
|
|
545 |
warnCommonMistakes:aBoolean
|
|
546 |
"this allows turning on/off warnings about common beginners mistakes.
|
|
547 |
Those are not really errors in the strict sense, but often lead to
|
|
548 |
run time errors later.
|
|
549 |
Examples are: expr or:expr2, where expr2 is not a block.
|
|
550 |
If you get bored by those warnings, turn them off by adding
|
|
551 |
a line as:
|
|
552 |
Compiler warnCommonMistakes:false
|
|
553 |
in your 'private.rc' file"
|
|
554 |
|
|
555 |
WarnCommonMistakes := aBoolean
|
|
556 |
!
|
|
557 |
|
|
558 |
warnDollarInIdentifier
|
|
559 |
"return true, if $-characters in identifiers are to be warned about"
|
|
560 |
|
|
561 |
^ Warnings and:[WarnDollarInIdentifier]
|
|
562 |
|
|
563 |
"Created: 7.9.1997 / 01:36:17 / cg"
|
|
564 |
!
|
|
565 |
|
|
566 |
warnDollarInIdentifier:aBoolean
|
|
567 |
"this allows turning on/off warnings about $-characters in identifiers.
|
|
568 |
You may find those warnings useful, to make certain that your code
|
|
569 |
is portable to other smalltalk versions, which do not allow this
|
|
570 |
(i.e. VW releases 2.x and maybe others).
|
|
571 |
Notice, that dollars are NEVER allowed as the first character in an identifier.
|
|
572 |
If you get bored by those warnings, turn them off by adding
|
|
573 |
a line as:
|
|
574 |
Compiler warnDollarInIdentifier:false
|
|
575 |
in your 'private.rc' file"
|
|
576 |
|
|
577 |
WarnDollarInIdentifier := aBoolean
|
|
578 |
|
|
579 |
"Created: 7.9.1997 / 01:37:42 / cg"
|
|
580 |
"Modified: 7.9.1997 / 01:40:02 / cg"
|
|
581 |
!
|
|
582 |
|
|
583 |
warnOldStyleAssignment
|
|
584 |
"return true, if underscore-assignment (pre ST-80v4 syntax) are to be warned about"
|
|
585 |
|
|
586 |
^ Warnings and:[WarnOldStyleAssignment]
|
|
587 |
!
|
|
588 |
|
|
589 |
warnOldStyleAssignment:aBoolean
|
|
590 |
"this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax).
|
|
591 |
If you get bored by those warnings, turn them off by adding
|
|
592 |
a line as:
|
|
593 |
Compiler warnOldStyleAssignment:false
|
|
594 |
in your 'private.rc' file"
|
|
595 |
|
|
596 |
WarnOldStyleAssignment := aBoolean
|
|
597 |
!
|
|
598 |
|
|
599 |
warnPossibleIncompatibilities
|
|
600 |
"return true, if possible incompatibilities (with other ST systems)
|
|
601 |
are to be warned about"
|
|
602 |
|
|
603 |
^ Warnings and:[WarnPossibleIncompatibilities]
|
|
604 |
|
|
605 |
"Modified: 23.5.1997 / 12:02:02 / cg"
|
|
606 |
!
|
|
607 |
|
|
608 |
warnPossibleIncompatibilities:aBoolean
|
|
609 |
"this turns warnings about possible incompatibilities (with other ST systems)
|
|
610 |
on or off.
|
|
611 |
If you get bored by those warnings, turn them off by adding
|
|
612 |
a line as:
|
|
613 |
Compiler warnPossibleIncompatibilities:false
|
|
614 |
in your 'private.rc' file."
|
|
615 |
|
|
616 |
WarnPossibleIncompatibilities := aBoolean
|
|
617 |
|
|
618 |
"Created: 23.5.1997 / 12:02:45 / cg"
|
|
619 |
!
|
|
620 |
|
|
621 |
warnSTXSpecials
|
|
622 |
"return true, if ST/X specials are to be warned about"
|
|
623 |
|
|
624 |
^ Warnings and:[WarnSTXSpecials]
|
|
625 |
!
|
|
626 |
|
|
627 |
warnSTXSpecials:aBoolean
|
|
628 |
"this allows turning on/off warnings about stx specials.
|
|
629 |
If you get bored by those warnings, turn them off by adding
|
|
630 |
a line as:
|
|
631 |
Compiler warnSTXSpecials:false
|
|
632 |
in your 'private.rc' file"
|
|
633 |
|
|
634 |
WarnSTXSpecials := aBoolean
|
|
635 |
!
|
|
636 |
|
|
637 |
warnUnderscoreInIdentifier
|
|
638 |
"return true, if underscores in identifiers are to be warned about"
|
|
639 |
|
|
640 |
^ Warnings and:[WarnUnderscoreInIdentifier]
|
|
641 |
!
|
|
642 |
|
|
643 |
warnUnderscoreInIdentifier:aBoolean
|
|
644 |
"this allows turning on/off warnings about underscores in identifiers.
|
|
645 |
You may find those warnings useful, to make certain that your code
|
|
646 |
is portable to other smalltalk versions, which do not allow this
|
|
647 |
(i.e. VW releases 2.x).
|
|
648 |
If you get bored by those warnings, turn them off by adding
|
|
649 |
a line as:
|
|
650 |
Compiler warnUnderscoreInIdentifier:false
|
|
651 |
in your 'private.rc' file"
|
|
652 |
|
|
653 |
WarnUnderscoreInIdentifier := aBoolean
|
|
654 |
|
|
655 |
"Modified: 7.9.1997 / 01:37:13 / cg"
|
|
656 |
!
|
|
657 |
|
|
658 |
warnUnusedVars
|
|
659 |
"controls generation of warning messages about unued method variables"
|
|
660 |
|
|
661 |
^ WarnUnusedVars
|
|
662 |
!
|
|
663 |
|
|
664 |
warnUnusedVars:aBoolean
|
|
665 |
"controls generation of warning messages about unued method variables"
|
|
666 |
|
|
667 |
WarnUnusedVars := aBoolean
|
|
668 |
!
|
|
669 |
|
|
670 |
warnings
|
|
671 |
"return true, if any warnings are to be shown"
|
|
672 |
|
|
673 |
^ Warnings
|
|
674 |
!
|
|
675 |
|
|
676 |
warnings:aBoolean
|
|
677 |
"this allows turning on/off all warnings; the default is on.
|
|
678 |
You can turn off warnings in your 'private.rc' file with
|
|
679 |
Compiler warnings:false
|
|
680 |
"
|
|
681 |
|
|
682 |
Warnings := aBoolean
|
|
683 |
|
|
684 |
"Modified: 23.5.1997 / 12:03:05 / cg"
|
|
685 |
! !
|
|
686 |
|
|
687 |
!ParserFlags class methodsFor:'class initialization'!
|
|
688 |
|
|
689 |
initialize
|
|
690 |
Warnings := true.
|
|
691 |
WarnUndeclared := true.
|
|
692 |
WarnUnusedVars := true.
|
|
693 |
WarnSTXSpecials := false.
|
|
694 |
WarnST80Directives := false.
|
|
695 |
WarnAboutWrongVariableNames := true.
|
|
696 |
WarnAboutVariableNameConventions := true.
|
1652
|
697 |
WarnAboutBadComments := true.
|
1634
|
698 |
WarnUnderscoreInIdentifier := false.
|
|
699 |
WarnDollarInIdentifier := true.
|
|
700 |
WarnOldStyleAssignment := true.
|
|
701 |
WarnCommonMistakes := true.
|
|
702 |
WarnPossibleIncompatibilities := false.
|
1638
|
703 |
WarnHiddenVariables := true.
|
1634
|
704 |
|
|
705 |
AllowReservedWordsAsSelectors := false.
|
|
706 |
AllowUnderscoreInIdentifier := true. "/ underscores in identifiers
|
|
707 |
AllowDollarInIdentifier := false. "/ st80-vms dollars in identifiers
|
|
708 |
AllowOldStyleAssignment := true. "/ st80 underscore as assignment
|
|
709 |
AllowSqueakExtensions := false. "/ squeak computed array
|
|
710 |
AllowDolphinExtensions := false. "/ dolphin computed literal
|
|
711 |
AllowQualifiedNames := false. "/ vw3 qualified names
|
|
712 |
AllowExtendedBinarySelectors := false. "/ vw5.4 extended binary selectors (plus/minus, center-dot etc.)
|
|
713 |
AllowLiteralNameSpaceSymbols := true. "/ st/x literal nameSpace-symbols (#foo::bar)
|
|
714 |
AllowArrayIndexSyntaxExtension := false.
|
|
715 |
AllowFunctionCallSyntaxForBlockEvaluation := false.
|
|
716 |
AllowLocalVariableDeclarationWithInitializerExpression := false.
|
|
717 |
AllowDomainVariables := false.
|
|
718 |
AllowArrayIndexSyntaxExtension := false.
|
|
719 |
AllowReservedWordsAsSelectors := true.
|
|
720 |
AllowVariableReferences := false.
|
|
721 |
AllowLazyValueExtension := false.
|
|
722 |
AllowFixedPointLiterals := false.
|
|
723 |
AllowExtendedSTXSyntax := false.
|
1655
|
724 |
AllowVisualAgeESSymbolLiterals := false.
|
1634
|
725 |
|
|
726 |
ArraysAreImmutable := false. "/ no longer care for ST-80 compatibility
|
|
727 |
StringsAreImmutable := false. "/ no longer care for ST-80 compatibility
|
|
728 |
ImplicitSelfSends := false.
|
|
729 |
|
1658
|
730 |
STCKeepCIntermediate := false.
|
|
731 |
STCKeepOIntermediate := false.
|
|
732 |
STCKeepSTIntermediate := false.
|
|
733 |
STCModulePath := './modules'.
|
|
734 |
STCCompilation := #default.
|
|
735 |
|
|
736 |
OperatingSystem isMSWINDOWSlike ifTrue:[
|
|
737 |
STCCompilationIncludes := '-I..\..\include -I..\..\libopengl -IC:\Borland\bcc55\Include'.
|
|
738 |
STCCompilationDefines := '-DWIN32'.
|
|
739 |
STCCompilationOptions := '+optinline +inlineNew'.
|
|
740 |
STCPath := '..\..\stc\stc.exe'.
|
|
741 |
CCCompilationOptions := ''.
|
|
742 |
CCPath := 'bcc32'.
|
|
743 |
LinkArgs := '-L..\..\libbc -LC:\Borland\bcc55\Lib -r -c -ap -Tpd -Gi -w-dup'.
|
|
744 |
LinkCommand := 'ilink32'.
|
|
745 |
LibPath := ''.
|
|
746 |
SearchedLibraries := 'import32.lib'.
|
|
747 |
] ifFalse:[
|
|
748 |
STCCompilationIncludes := '-I../../include'.
|
|
749 |
STCCompilationDefines := ''.
|
|
750 |
STCCompilationOptions := '+optinline +inlineNew'.
|
|
751 |
STCPath := '../../stc/stc'.
|
|
752 |
CCCompilationOptions := '-O'.
|
|
753 |
CCPath := 'cc'.
|
|
754 |
LinkArgs := ''.
|
|
755 |
LinkCommand := 'ld'.
|
|
756 |
LibPath := ''.
|
|
757 |
SearchedLibraries := ''.
|
|
758 |
].
|
|
759 |
|
1634
|
760 |
"
|
|
761 |
ParserFlags initialize
|
|
762 |
"
|
|
763 |
! !
|
|
764 |
|
1658
|
765 |
!ParserFlags methodsFor:'accessing-compilation control'!
|
|
766 |
|
|
767 |
arraysAreImmutable
|
|
768 |
^ arraysAreImmutable
|
|
769 |
!
|
|
770 |
|
|
771 |
arraysAreImmutable:aBoolean
|
|
772 |
arraysAreImmutable := aBoolean.
|
|
773 |
!
|
|
774 |
|
|
775 |
stringsAreImmutable
|
|
776 |
^ stringsAreImmutable
|
|
777 |
!
|
|
778 |
|
|
779 |
stringsAreImmutable:aBoolean
|
|
780 |
stringsAreImmutable := aBoolean.
|
|
781 |
! !
|
|
782 |
|
|
783 |
!ParserFlags methodsFor:'accessing-stc compilation control'!
|
|
784 |
|
|
785 |
ccCompilationOptions
|
|
786 |
^ ccCompilationOptions
|
|
787 |
!
|
|
788 |
|
|
789 |
ccCompilationOptions:something
|
|
790 |
ccCompilationOptions := something.
|
|
791 |
!
|
|
792 |
|
|
793 |
ccPath
|
|
794 |
^ ccPath
|
|
795 |
!
|
|
796 |
|
|
797 |
ccPath:something
|
|
798 |
ccPath := something.
|
|
799 |
!
|
|
800 |
|
|
801 |
implicitSelfSends
|
|
802 |
^ implicitSelfSends
|
|
803 |
!
|
|
804 |
|
|
805 |
implicitSelfSends:aBoolean
|
|
806 |
implicitSelfSends := aBoolean.
|
|
807 |
!
|
|
808 |
|
|
809 |
libPath
|
|
810 |
^ libPath
|
|
811 |
!
|
|
812 |
|
|
813 |
libPath:aString
|
|
814 |
libPath := aString
|
|
815 |
!
|
|
816 |
|
|
817 |
linkArgs
|
|
818 |
^ linkArgs
|
|
819 |
!
|
|
820 |
|
|
821 |
linkArgs:aString
|
|
822 |
linkArgs := aString
|
|
823 |
!
|
|
824 |
|
|
825 |
linkCommand
|
|
826 |
^ linkCommand
|
|
827 |
!
|
|
828 |
|
|
829 |
linkCommand:aString
|
|
830 |
linkCommand := aString
|
|
831 |
!
|
|
832 |
|
|
833 |
searchedLibraries
|
|
834 |
^ searchedLibraries
|
|
835 |
!
|
|
836 |
|
|
837 |
searchedLibraries:aString
|
|
838 |
searchedLibraries := aString
|
|
839 |
!
|
|
840 |
|
|
841 |
stcCompilation
|
|
842 |
^ stcCompilation
|
|
843 |
!
|
|
844 |
|
|
845 |
stcCompilation:something
|
|
846 |
stcCompilation := something.
|
|
847 |
!
|
|
848 |
|
|
849 |
stcCompilationDefines
|
|
850 |
^ stcCompilationDefines
|
|
851 |
!
|
|
852 |
|
|
853 |
stcCompilationDefines:something
|
|
854 |
stcCompilationDefines := something.
|
|
855 |
!
|
|
856 |
|
|
857 |
stcCompilationIncludes
|
|
858 |
^ stcCompilationIncludes
|
|
859 |
!
|
|
860 |
|
|
861 |
stcCompilationIncludes:something
|
|
862 |
stcCompilationIncludes := something.
|
|
863 |
!
|
|
864 |
|
|
865 |
stcCompilationOptions
|
|
866 |
^ stcCompilationOptions
|
|
867 |
!
|
|
868 |
|
|
869 |
stcCompilationOptions:something
|
|
870 |
stcCompilationOptions := something.
|
|
871 |
!
|
|
872 |
|
|
873 |
stcKeepCIntermediate
|
|
874 |
^ stcKeepCIntermediate
|
|
875 |
!
|
|
876 |
|
|
877 |
stcKeepCIntermediate:something
|
|
878 |
stcKeepCIntermediate := something.
|
|
879 |
!
|
|
880 |
|
|
881 |
stcKeepOIntermediate
|
|
882 |
^ stcKeepOIntermediate
|
|
883 |
!
|
|
884 |
|
|
885 |
stcKeepOIntermediate:something
|
|
886 |
stcKeepOIntermediate := something.
|
|
887 |
!
|
|
888 |
|
|
889 |
stcKeepSTIntermediate
|
|
890 |
^ stcKeepSTIntermediate
|
|
891 |
!
|
|
892 |
|
|
893 |
stcKeepSTIntermediate:something
|
|
894 |
stcKeepSTIntermediate := something.
|
|
895 |
!
|
|
896 |
|
|
897 |
stcModulePath
|
|
898 |
^ stcModulePath
|
|
899 |
!
|
|
900 |
|
|
901 |
stcModulePath:something
|
|
902 |
stcModulePath := something.
|
|
903 |
!
|
|
904 |
|
|
905 |
stcPath
|
|
906 |
^ stcPath
|
|
907 |
!
|
|
908 |
|
|
909 |
stcPath:something
|
|
910 |
stcPath := something.
|
|
911 |
! !
|
|
912 |
|
|
913 |
!ParserFlags methodsFor:'accessing-syntax-control'!
|
1634
|
914 |
|
|
915 |
allowArrayIndexSyntaxExtension
|
|
916 |
^ allowArrayIndexSyntaxExtension
|
|
917 |
!
|
|
918 |
|
|
919 |
allowArrayIndexSyntaxExtension:aBoolean
|
|
920 |
allowArrayIndexSyntaxExtension := aBoolean.
|
|
921 |
!
|
|
922 |
|
|
923 |
allowDollarInIdentifier
|
|
924 |
^ allowDollarInIdentifier
|
|
925 |
!
|
|
926 |
|
|
927 |
allowDollarInIdentifier:aBoolean
|
|
928 |
allowDollarInIdentifier := aBoolean.
|
|
929 |
!
|
|
930 |
|
|
931 |
allowDolphinExtensions
|
|
932 |
^ allowDolphinExtensions
|
|
933 |
!
|
|
934 |
|
|
935 |
allowDolphinExtensions:aBoolean
|
|
936 |
allowDolphinExtensions := aBoolean
|
|
937 |
!
|
|
938 |
|
|
939 |
allowDomainVariables
|
|
940 |
^ allowDomainVariables
|
|
941 |
!
|
|
942 |
|
|
943 |
allowDomainVariables:aBoolean
|
|
944 |
allowDomainVariables := aBoolean.
|
|
945 |
!
|
|
946 |
|
|
947 |
allowExtendedBinarySelectors
|
|
948 |
^ allowExtendedBinarySelectors
|
|
949 |
!
|
|
950 |
|
|
951 |
allowExtendedBinarySelectors:aBoolean
|
|
952 |
allowExtendedBinarySelectors := aBoolean.
|
|
953 |
!
|
|
954 |
|
|
955 |
allowExtendedSTXSyntax
|
|
956 |
^ allowExtendedSTXSyntax
|
|
957 |
!
|
|
958 |
|
|
959 |
allowExtendedSTXSyntax:something
|
|
960 |
allowExtendedSTXSyntax := something.
|
|
961 |
!
|
|
962 |
|
|
963 |
allowFixedPointLiterals
|
|
964 |
^ allowFixedPointLiterals
|
|
965 |
!
|
|
966 |
|
|
967 |
allowFixedPointLiterals:something
|
|
968 |
allowFixedPointLiterals := something.
|
|
969 |
!
|
|
970 |
|
|
971 |
allowFunctionCallSyntaxForBlockEvaluation
|
|
972 |
^ allowFunctionCallSyntaxForBlockEvaluation
|
|
973 |
!
|
|
974 |
|
|
975 |
allowFunctionCallSyntaxForBlockEvaluation:aBoolean
|
|
976 |
allowFunctionCallSyntaxForBlockEvaluation := aBoolean.
|
|
977 |
!
|
|
978 |
|
|
979 |
allowLazyValueExtension
|
|
980 |
^ allowLazyValueExtension
|
|
981 |
!
|
|
982 |
|
|
983 |
allowLazyValueExtension:something
|
|
984 |
allowLazyValueExtension := something.
|
|
985 |
!
|
|
986 |
|
|
987 |
allowLiteralNameSpaceSymbols
|
|
988 |
^ allowLiteralNameSpaceSymbols
|
|
989 |
!
|
|
990 |
|
|
991 |
allowLiteralNameSpaceSymbols:aBoolean
|
|
992 |
allowLiteralNameSpaceSymbols := aBoolean
|
|
993 |
!
|
|
994 |
|
|
995 |
allowLocalVariableDeclarationWithInitializerExpression
|
|
996 |
^ allowLocalVariableDeclarationWithInitializerExpression
|
|
997 |
!
|
|
998 |
|
|
999 |
allowLocalVariableDeclarationWithInitializerExpression:aBoolean
|
|
1000 |
allowLocalVariableDeclarationWithInitializerExpression := aBoolean.
|
|
1001 |
!
|
|
1002 |
|
|
1003 |
allowOldStyleAssignment
|
|
1004 |
^ allowOldStyleAssignment
|
|
1005 |
!
|
|
1006 |
|
|
1007 |
allowOldStyleAssignment:aBoolean
|
|
1008 |
allowOldStyleAssignment := aBoolean
|
|
1009 |
!
|
|
1010 |
|
|
1011 |
allowQualifiedNames
|
|
1012 |
^ allowQualifiedNames
|
|
1013 |
!
|
|
1014 |
|
|
1015 |
allowQualifiedNames:aBoolean
|
|
1016 |
allowQualifiedNames := aBoolean.
|
|
1017 |
!
|
|
1018 |
|
|
1019 |
allowReservedWordsAsSelectors
|
|
1020 |
^ allowReservedWordsAsSelectors
|
|
1021 |
!
|
|
1022 |
|
|
1023 |
allowReservedWordsAsSelectors:aBoolean
|
|
1024 |
allowReservedWordsAsSelectors := aBoolean.
|
|
1025 |
!
|
|
1026 |
|
|
1027 |
allowSqueakExtensions
|
|
1028 |
"return true, if support for squeak extensions
|
|
1029 |
computed arrays { .., }
|
|
1030 |
c/java style arguments in message sends rec foo(arg1, ... argN)
|
|
1031 |
is enabled."
|
|
1032 |
|
|
1033 |
^ allowSqueakExtensions
|
|
1034 |
!
|
|
1035 |
|
|
1036 |
allowSqueakExtensions:aBoolean
|
|
1037 |
"this allows turning on/off support for squeak extensions:
|
|
1038 |
computed arrays { .., }
|
|
1039 |
c/java style arguments in message sends rec foo(arg1, ... argN)
|
|
1040 |
"
|
|
1041 |
|
|
1042 |
allowSqueakExtensions := aBoolean
|
|
1043 |
!
|
|
1044 |
|
|
1045 |
allowUnderscoreInIdentifier
|
|
1046 |
^ allowUnderscoreInIdentifier
|
|
1047 |
!
|
|
1048 |
|
|
1049 |
allowUnderscoreInIdentifier:aBoolean
|
|
1050 |
allowUnderscoreInIdentifier := aBoolean
|
|
1051 |
!
|
|
1052 |
|
|
1053 |
allowVariableReferences
|
|
1054 |
^ allowVariableReferences
|
|
1055 |
!
|
|
1056 |
|
|
1057 |
allowVariableReferences:aBoolean
|
|
1058 |
allowVariableReferences := aBoolean.
|
|
1059 |
!
|
|
1060 |
|
1655
|
1061 |
allowVisualAgeESSymbolLiterals
|
|
1062 |
^ allowVisualAgeESSymbolLiterals
|
|
1063 |
!
|
|
1064 |
|
|
1065 |
allowVisualAgeESSymbolLiterals:aBoolean
|
|
1066 |
allowVisualAgeESSymbolLiterals := aBoolean.
|
1658
|
1067 |
! !
|
1634
|
1068 |
|
1658
|
1069 |
!ParserFlags methodsFor:'accessing-warning-control'!
|
1634
|
1070 |
|
1652
|
1071 |
warnAboutBadComments
|
|
1072 |
^ warnAboutBadComments
|
|
1073 |
!
|
|
1074 |
|
|
1075 |
warnAboutBadComments:aBoolean
|
|
1076 |
warnAboutBadComments := aBoolean.
|
|
1077 |
!
|
|
1078 |
|
1634
|
1079 |
warnAboutVariableNameConventions
|
|
1080 |
^ warnAboutVariableNameConventions
|
|
1081 |
!
|
|
1082 |
|
|
1083 |
warnAboutVariableNameConventions:aBoolean
|
|
1084 |
warnAboutVariableNameConventions := aBoolean.
|
|
1085 |
!
|
|
1086 |
|
|
1087 |
warnAboutWrongVariableNames
|
|
1088 |
^ warnAboutWrongVariableNames
|
|
1089 |
!
|
|
1090 |
|
|
1091 |
warnAboutWrongVariableNames:aBoolean
|
|
1092 |
warnAboutWrongVariableNames := aBoolean.
|
|
1093 |
!
|
|
1094 |
|
|
1095 |
warnCommonMistakes
|
|
1096 |
^ warnCommonMistakes
|
|
1097 |
!
|
|
1098 |
|
|
1099 |
warnCommonMistakes:aBoolean
|
|
1100 |
warnCommonMistakes := aBoolean.
|
|
1101 |
!
|
|
1102 |
|
|
1103 |
warnDollarInIdentifier
|
|
1104 |
^ warnDollarInIdentifier
|
|
1105 |
!
|
|
1106 |
|
|
1107 |
warnDollarInIdentifier:aBoolean
|
|
1108 |
warnDollarInIdentifier := aBoolean.
|
|
1109 |
!
|
|
1110 |
|
1638
|
1111 |
warnHiddenVariables
|
|
1112 |
^ warnHiddenVariables
|
|
1113 |
!
|
|
1114 |
|
|
1115 |
warnHiddenVariables:aBoolean
|
|
1116 |
warnHiddenVariables := aBoolean.
|
|
1117 |
!
|
|
1118 |
|
1634
|
1119 |
warnOldStyleAssignment
|
|
1120 |
^ warnOldStyleAssignment
|
|
1121 |
!
|
|
1122 |
|
|
1123 |
warnOldStyleAssignment:aBoolean
|
|
1124 |
warnOldStyleAssignment := aBoolean.
|
|
1125 |
!
|
|
1126 |
|
|
1127 |
warnPossibleIncompatibilities
|
|
1128 |
^ warnPossibleIncompatibilities
|
|
1129 |
!
|
|
1130 |
|
|
1131 |
warnPossibleIncompatibilities:aBoolean
|
|
1132 |
warnPossibleIncompatibilities := aBoolean.
|
|
1133 |
!
|
|
1134 |
|
|
1135 |
warnST80Directives
|
|
1136 |
^ warnST80Directives
|
|
1137 |
!
|
|
1138 |
|
|
1139 |
warnST80Directives:something
|
|
1140 |
warnST80Directives := something.
|
|
1141 |
!
|
|
1142 |
|
|
1143 |
warnSTXHereExtensionUsed
|
|
1144 |
^ warnSTXHereExtensionUsed
|
|
1145 |
!
|
|
1146 |
|
|
1147 |
warnSTXHereExtensionUsed:aBoolean
|
|
1148 |
warnSTXHereExtensionUsed := aBoolean.
|
|
1149 |
!
|
|
1150 |
|
|
1151 |
warnSTXNameSpaceUse
|
|
1152 |
^ warnSTXNameSpaceUse
|
|
1153 |
!
|
|
1154 |
|
|
1155 |
warnSTXNameSpaceUse:aBoolean
|
|
1156 |
warnSTXNameSpaceUse := aBoolean.
|
|
1157 |
!
|
|
1158 |
|
|
1159 |
warnSTXSpecialComment
|
|
1160 |
^ warnSTXSpecialComment
|
|
1161 |
!
|
|
1162 |
|
|
1163 |
warnSTXSpecialComment:aBoolean
|
|
1164 |
warnSTXSpecialComment := aBoolean.
|
|
1165 |
!
|
|
1166 |
|
|
1167 |
warnUndeclared
|
|
1168 |
^ warnUndeclared
|
|
1169 |
!
|
|
1170 |
|
|
1171 |
warnUndeclared:aBoolean
|
|
1172 |
warnUndeclared := aBoolean.
|
|
1173 |
!
|
|
1174 |
|
|
1175 |
warnUnderscoreInIdentifier
|
|
1176 |
^ warnUnderscoreInIdentifier
|
|
1177 |
!
|
|
1178 |
|
|
1179 |
warnUnderscoreInIdentifier:aBoolean
|
|
1180 |
warnUnderscoreInIdentifier := aBoolean.
|
|
1181 |
!
|
|
1182 |
|
|
1183 |
warnUnusedVars
|
|
1184 |
^ warnUnusedVars
|
|
1185 |
!
|
|
1186 |
|
|
1187 |
warnUnusedVars:aBoolean
|
|
1188 |
warnUnusedVars := aBoolean.
|
|
1189 |
! !
|
|
1190 |
|
|
1191 |
!ParserFlags methodsFor:'initialization'!
|
|
1192 |
|
|
1193 |
initialize
|
|
1194 |
warnUndeclared := WarnUndeclared.
|
|
1195 |
warnUnusedVars := WarnUnusedVars.
|
|
1196 |
warnST80Directives := WarnST80Directives.
|
|
1197 |
warnSTXSpecialComment := WarnSTXSpecials.
|
|
1198 |
warnSTXNameSpaceUse := WarnSTXSpecials.
|
|
1199 |
warnSTXHereExtensionUsed := WarnSTXSpecials.
|
|
1200 |
warnUnderscoreInIdentifier := WarnUnderscoreInIdentifier.
|
|
1201 |
warnDollarInIdentifier := WarnDollarInIdentifier.
|
|
1202 |
warnOldStyleAssignment := WarnOldStyleAssignment.
|
|
1203 |
warnCommonMistakes := WarnCommonMistakes.
|
|
1204 |
warnPossibleIncompatibilities := WarnPossibleIncompatibilities.
|
|
1205 |
warnAboutVariableNameConventions := WarnAboutVariableNameConventions.
|
|
1206 |
warnAboutWrongVariableNames := WarnAboutWrongVariableNames.
|
1652
|
1207 |
warnAboutBadComments := WarnAboutBadComments.
|
1638
|
1208 |
warnHiddenVariables := WarnHiddenVariables.
|
1634
|
1209 |
|
|
1210 |
allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier.
|
|
1211 |
allowDollarInIdentifier := AllowDollarInIdentifier.
|
|
1212 |
allowOldStyleAssignment := AllowOldStyleAssignment.
|
|
1213 |
allowSqueakExtensions := AllowSqueakExtensions.
|
|
1214 |
allowDolphinExtensions := AllowDolphinExtensions.
|
|
1215 |
allowLiteralNameSpaceSymbols := AllowLiteralNameSpaceSymbols.
|
|
1216 |
allowExtendedBinarySelectors := AllowExtendedBinarySelectors.
|
|
1217 |
allowFunctionCallSyntaxForBlockEvaluation := AllowFunctionCallSyntaxForBlockEvaluation.
|
|
1218 |
allowLocalVariableDeclarationWithInitializerExpression := AllowLocalVariableDeclarationWithInitializerExpression.
|
|
1219 |
allowDomainVariables := AllowDomainVariables.
|
|
1220 |
allowArrayIndexSyntaxExtension := AllowArrayIndexSyntaxExtension.
|
|
1221 |
allowReservedWordsAsSelectors := AllowReservedWordsAsSelectors.
|
|
1222 |
allowVariableReferences := AllowVariableReferences.
|
|
1223 |
allowLazyValueExtension := AllowLazyValueExtension.
|
|
1224 |
allowFixedPointLiterals := AllowFixedPointLiterals.
|
|
1225 |
allowExtendedSTXSyntax := AllowExtendedSTXSyntax.
|
|
1226 |
allowQualifiedNames := AllowQualifiedNames.
|
1655
|
1227 |
allowVisualAgeESSymbolLiterals := AllowVisualAgeESSymbolLiterals.
|
1634
|
1228 |
|
|
1229 |
arraysAreImmutable := ArraysAreImmutable ? true.
|
|
1230 |
stringsAreImmutable := StringsAreImmutable ? true.
|
|
1231 |
implicitSelfSends := ImplicitSelfSends ? false.
|
|
1232 |
|
1658
|
1233 |
stcKeepCIntermediate := STCKeepCIntermediate.
|
|
1234 |
stcKeepOIntermediate := STCKeepOIntermediate.
|
|
1235 |
stcKeepSTIntermediate := STCKeepSTIntermediate.
|
|
1236 |
stcModulePath := STCModulePath.
|
|
1237 |
stcCompilation := STCCompilation.
|
|
1238 |
stcCompilationIncludes := STCCompilationIncludes.
|
|
1239 |
stcCompilationDefines := STCCompilationDefines.
|
|
1240 |
stcCompilationOptions := STCCompilationOptions.
|
|
1241 |
stcPath := STCPath.
|
|
1242 |
ccCompilationOptions := CCCompilationOptions.
|
|
1243 |
ccPath := CCPath.
|
|
1244 |
linkArgs := LinkArgs.
|
|
1245 |
linkCommand := LinkCommand.
|
|
1246 |
libPath := LibPath.
|
|
1247 |
searchedLibraries := SearchedLibraries.
|
|
1248 |
|
1634
|
1249 |
"
|
|
1250 |
ParserFlags initialize.
|
|
1251 |
self new inspect.
|
|
1252 |
"
|
|
1253 |
! !
|
|
1254 |
|
|
1255 |
!ParserFlags class methodsFor:'documentation'!
|
|
1256 |
|
|
1257 |
version
|
1658
|
1258 |
^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.5 2006-02-08 15:11:45 cg Exp $'
|
1634
|
1259 |
! !
|
|
1260 |
|
|
1261 |
ParserFlags initialize!
|