changeset 3396 | c84c3d5a9e50 |
parent 3391 | 94ed984ef38e |
child 3455 | 583dd776d514 |
3395:c43cb9bbd88c | 3396:c84c3d5a9e50 |
---|---|
1 " |
1 " |
2 COPYRIGHT (c) 1989 by Claus Gittinger |
2 COPYRIGHT (c) 1989 by Claus Gittinger |
3 COPYRIGHT (c) 2005 by eXept Software AG |
3 COPYRIGHT (c) 2005 by eXept Software AG |
4 All Rights Reserved |
4 All Rights Reserved |
5 |
5 |
6 This software is furnished under a license and may be used |
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 |
7 only in accordance with the terms of that license and with the |
8 inclusion of the above copyright notice. This software may not |
8 inclusion of the above copyright notice. This software may not |
9 be provided or otherwise made available to, or used by, any |
9 be provided or otherwise made available to, or used by, any |
104 |
104 |
105 copyright |
105 copyright |
106 " |
106 " |
107 COPYRIGHT (c) 1989 by Claus Gittinger |
107 COPYRIGHT (c) 1989 by Claus Gittinger |
108 COPYRIGHT (c) 2005 by eXept Software AG |
108 COPYRIGHT (c) 2005 by eXept Software AG |
109 All Rights Reserved |
109 All Rights Reserved |
110 |
110 |
111 This software is furnished under a license and may be used |
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 |
112 only in accordance with the terms of that license and with the |
113 inclusion of the above copyright notice. This software may not |
113 inclusion of the above copyright notice. This software may not |
114 be provided or otherwise made available to, or used by, any |
114 be provided or otherwise made available to, or used by, any |
121 " |
121 " |
122 compiler flags (used to be defined in Scanner and Parser) have been extracted for easier |
122 compiler flags (used to be defined in Scanner and Parser) have been extracted for easier |
123 individual-method customization (using ST as scripting). |
123 individual-method customization (using ST as scripting). |
124 |
124 |
125 howTo_fileInVSE: |
125 howTo_fileInVSE: |
126 ParserFlags allowSTVExtensions:true. |
126 ParserFlags allowSTVExtensions:true. |
127 ParserFlags allowSTVPrimitives:true. |
127 ParserFlags allowSTVPrimitives:true. |
128 ParserFlags allowSTXEOLComments:false. |
128 ParserFlags allowSTXEOLComments:false. |
129 |
129 |
130 for stx debugging: |
130 for stx debugging: |
131 STCKeepCIntermediate := true |
131 STCKeepCIntermediate := true |
132 |
132 |
133 " |
133 " |
134 ! ! |
134 ! ! |
135 |
135 |
136 !ParserFlags class methodsFor:'instance creation'! |
136 !ParserFlags class methodsFor:'instance creation'! |
173 ArraysAreImmutable := aBoolean. |
173 ArraysAreImmutable := aBoolean. |
174 |
174 |
175 " |
175 " |
176 can be added to your private.rc file: |
176 can be added to your private.rc file: |
177 |
177 |
178 ParserFlags arraysAreImmutable:true |
178 ParserFlags arraysAreImmutable:true |
179 ParserFlags arraysAreImmutable:false |
179 ParserFlags arraysAreImmutable:false |
180 " |
180 " |
181 ! |
181 ! |
182 |
182 |
183 fullLineNumberInfo |
183 fullLineNumberInfo |
184 ^ (self lineNumberInfo == #full) |
184 ^ (self lineNumberInfo == #full) |
199 |
199 |
200 ImplicitSelfSends := aBoolean |
200 ImplicitSelfSends := aBoolean |
201 |
201 |
202 " |
202 " |
203 Compiler implicitSelfSends:true |
203 Compiler implicitSelfSends:true |
204 Compiler implicitSelfSends:false |
204 Compiler implicitSelfSends:false |
205 " |
205 " |
206 ! |
206 ! |
207 |
207 |
208 lineNumberInfo |
208 lineNumberInfo |
209 ^ LineNumberInfo |
209 ^ LineNumberInfo |
231 StringsAreImmutable := aBoolean. |
231 StringsAreImmutable := aBoolean. |
232 |
232 |
233 " |
233 " |
234 can be added to your private.rc file: |
234 can be added to your private.rc file: |
235 |
235 |
236 ParserFlags stringsAreImmutable:true |
236 ParserFlags stringsAreImmutable:true |
237 ParserFlags stringsAreImmutable:false |
237 ParserFlags stringsAreImmutable:false |
238 " |
238 " |
239 |
239 |
240 "Created: / 3.8.1998 / 14:53:28 / cg" |
240 "Created: / 3.8.1998 / 14:53:28 / cg" |
241 ! ! |
241 ! ! |
242 |
242 |
243 !ParserFlags class methodsFor:'accessing-per method flags'! |
243 !ParserFlags class methodsFor:'accessing-per method flags'! |
244 |
244 |
245 disableFlag:flagName forClass:class selector:selector |
245 disableFlag:flagName forClass:class selector:selector |
246 "remember that warnings named flagName (such as #warnUnusedVars) |
246 "remember that warnings named flagName (such as #warnUnusedVars) |
247 are disabled for a particular method. |
247 are disabled for a particular method. |
248 Sent if user wants to disable warnings in the future |
248 Sent if user wants to disable warnings in the future |
249 (try defining a method with an unused var, to see)" |
249 (try defining a method with an unused var, to see)" |
250 |
250 |
251 |key| |
251 |key| |
252 |
252 |
253 PerMethodFlags isNil ifTrue:[ |
253 PerMethodFlags isNil ifTrue:[ |
254 PerMethodFlags := Dictionary new. |
254 PerMethodFlags := Dictionary new. |
255 ]. |
255 ]. |
256 key := class name, '>>',selector. |
256 key := class name, '>>',selector. |
257 PerMethodFlags at:key put:(Timestamp now + self perMethodDisableWarningTimeDuration). |
257 PerMethodFlags at:key put:(Timestamp now + self perMethodDisableWarningTimeDuration). |
258 |
258 |
259 "Created: / 28-02-2012 / 12:57:45 / cg" |
259 "Created: / 28-02-2012 / 12:57:45 / cg" |
438 ^ STCKeepCIntermediate ? false |
438 ^ STCKeepCIntermediate ? false |
439 |
439 |
440 "Modified: / 16-09-2011 / 19:56:18 / cg" |
440 "Modified: / 16-09-2011 / 19:56:18 / cg" |
441 ! |
441 ! |
442 |
442 |
443 stcKeepCIntermediate:something |
443 stcKeepCIntermediate:something |
444 STCKeepCIntermediate := something. |
444 STCKeepCIntermediate := something. |
445 |
445 |
446 " |
446 " |
447 STCKeepCIntermediate := true. |
447 STCKeepCIntermediate := true. |
448 STCKeepCIntermediate := false. |
448 STCKeepCIntermediate := false. |
455 ^ STCKeepOIntermediate ? false |
455 ^ STCKeepOIntermediate ? false |
456 |
456 |
457 "Modified: / 16-09-2011 / 19:56:49 / cg" |
457 "Modified: / 16-09-2011 / 19:56:49 / cg" |
458 ! |
458 ! |
459 |
459 |
460 stcKeepOIntermediate:something |
460 stcKeepOIntermediate:something |
461 STCKeepOIntermediate := something. |
461 STCKeepOIntermediate := something. |
462 ! |
462 ! |
463 |
463 |
464 stcKeepSTIntermediate |
464 stcKeepSTIntermediate |
465 ^ STCKeepSTIntermediate ? false |
465 ^ STCKeepSTIntermediate ? false |
470 " |
470 " |
471 |
471 |
472 "Modified: / 16-09-2011 / 19:57:17 / cg" |
472 "Modified: / 16-09-2011 / 19:57:17 / cg" |
473 ! |
473 ! |
474 |
474 |
475 stcKeepSTIntermediate:something |
475 stcKeepSTIntermediate:something |
476 STCKeepSTIntermediate := something. |
476 STCKeepSTIntermediate := something. |
477 |
477 |
478 " |
478 " |
479 STCKeepSTIntermediate := true. |
479 STCKeepSTIntermediate := true. |
480 STCKeepSTIntermediate := false. |
480 STCKeepSTIntermediate := false. |
485 |
485 |
486 stcModulePath |
486 stcModulePath |
487 ^ STCModulePath |
487 ^ STCModulePath |
488 ! |
488 ! |
489 |
489 |
490 stcModulePath:something |
490 stcModulePath:something |
491 STCModulePath := something. |
491 STCModulePath := something. |
492 ! |
492 ! |
493 |
493 |
494 stcPath |
494 stcPath |
495 ^ STCPath |
495 ^ STCPath |
565 dfn = DefineForMINGW32 ifTrue:[ ^'mingw']. |
565 dfn = DefineForMINGW32 ifTrue:[ ^'mingw']. |
566 dfn = DefineForMINGW ifTrue:[ ^'mingw']. |
566 dfn = DefineForMINGW ifTrue:[ ^'mingw']. |
567 "/ dfn = DefineForLCC ifTrue:[ ^'lcc']. |
567 "/ dfn = DefineForLCC ifTrue:[ ^'lcc']. |
568 |
568 |
569 OperatingSystem isMSWINDOWSlike ifTrue:[ |
569 OperatingSystem isMSWINDOWSlike ifTrue:[ |
570 ^ 'bcc' |
570 ^ 'bcc' |
571 ]. |
571 ]. |
572 ^ 'gcc' |
572 ^ 'gcc' |
573 |
573 |
574 " |
574 " |
575 self usedCompiler |
575 self usedCompiler |
684 but instead are scanned as character-constant prefix. |
684 but instead are scanned as character-constant prefix. |
685 If turned on, dollars are in identifiers are allowed, while extra |
685 If turned on, dollars are in identifiers are allowed, while extra |
686 dollars are still scanned as constant character prefix. |
686 dollars are still scanned as constant character prefix. |
687 If you have to fileIn old VW-Vsn2.x classes, turn this off |
687 If you have to fileIn old VW-Vsn2.x classes, turn this off |
688 before filing them in; i.e.: |
688 before filing them in; i.e.: |
689 Compiler allowDollarInIdentifiers:false" |
689 Compiler allowDollarInIdentifiers:false" |
690 |
690 |
691 AllowDollarInIdentifier := aBoolean. |
691 AllowDollarInIdentifier := aBoolean. |
692 |
692 |
693 "Created: 7.9.1997 / 01:34:49 / cg" |
693 "Created: 7.9.1997 / 01:34:49 / cg" |
694 "Modified: 7.9.1997 / 01:39:30 / cg" |
694 "Modified: 7.9.1997 / 01:39:30 / cg" |
701 ! |
701 ! |
702 |
702 |
703 allowDolphinExtensions:aBoolean |
703 allowDolphinExtensions:aBoolean |
704 "this allows turning on/off support for computed arrays ##(..) as in dolphin. |
704 "this allows turning on/off support for computed arrays ##(..) as in dolphin. |
705 If you want to fileIn Dolphin classes, enable this with: |
705 If you want to fileIn Dolphin classes, enable this with: |
706 Compiler allowDolphinComputedArrays:true" |
706 Compiler allowDolphinComputedArrays:true" |
707 |
707 |
708 AllowDolphinExtensions := aBoolean. |
708 AllowDolphinExtensions := aBoolean. |
709 |
709 |
710 " |
710 " |
711 self allowDolphinExtensions:true |
711 self allowDolphinExtensions:true |
762 |
762 |
763 " |
763 " |
764 self allowExtendedSTXSyntax:true |
764 self allowExtendedSTXSyntax:true |
765 'a\tb' inspect. |
765 'a\tb' inspect. |
766 'a\u1616b' inspect. |
766 'a\u1616b' inspect. |
767 self allowExtendedSTXSyntax:false |
767 self allowExtendedSTXSyntax:false |
768 " |
768 " |
769 ! |
769 ! |
770 |
770 |
771 allowFixedPointLiterals |
771 allowFixedPointLiterals |
772 "return true, if nnnsn (FixedPoint) literals are allowed" |
772 "return true, if nnnsn (FixedPoint) literals are allowed" |
803 allowHashAsBinarySelector:aBoolean |
803 allowHashAsBinarySelector:aBoolean |
804 AllowHashAsBinarySelector := aBoolean |
804 AllowHashAsBinarySelector := aBoolean |
805 |
805 |
806 " |
806 " |
807 self allowHashAsBinarySelector:true |
807 self allowHashAsBinarySelector:true |
808 self allowHashAsBinarySelector:false |
808 self allowHashAsBinarySelector:false |
809 " |
809 " |
810 ! |
810 ! |
811 |
811 |
812 allowLiteralNameSpaceSymbols |
812 allowLiteralNameSpaceSymbols |
813 "return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
813 "return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed" |
892 ! |
892 ! |
893 |
893 |
894 allowQualifiedNames:aBoolean |
894 allowQualifiedNames:aBoolean |
895 "this allows turning on/off support for qualifiedNames #{ .., } as in vw3. |
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: |
896 If you want to fileIn vw3 or later classes, enable this with: |
897 Compiler allowQualifiedNames:true |
897 Compiler allowQualifiedNames:true |
898 Notice, that qualified names are not really supported semantically |
898 Notice, that qualified names are not really supported semantically |
899 (they are parsed, but treated like regular globals) |
899 (they are parsed, but treated like regular globals) |
900 " |
900 " |
901 |
901 |
902 AllowQualifiedNames := aBoolean. |
902 AllowQualifiedNames := aBoolean. |
933 ! |
933 ! |
934 |
934 |
935 allowSTVExtensions:aBoolean |
935 allowSTVExtensions:aBoolean |
936 "this allows turning on/off support for ST/V extensions: |
936 "this allows turning on/off support for ST/V extensions: |
937 If you want to fileIn ST/V classes, enable this with: |
937 If you want to fileIn ST/V classes, enable this with: |
938 Compiler allowSTVComputedArrays:true" |
938 Compiler allowSTVComputedArrays:true" |
939 |
939 |
940 AllowSTVExtensions := aBoolean. |
940 AllowSTVExtensions := aBoolean. |
941 |
941 |
942 " |
942 " |
943 ParserFlags allowSTVExtensions:true |
943 ParserFlags allowSTVExtensions:true |
987 " |
987 " |
988 ! |
988 ! |
989 |
989 |
990 allowSqueakExtensions |
990 allowSqueakExtensions |
991 "return true, if support for squeak extensions |
991 "return true, if support for squeak extensions |
992 computed arrays { .., } |
992 computed arrays { .., } |
993 c/java style arguments in message sends rec foo(arg1, ... argN) |
993 c/java style arguments in message sends rec foo(arg1, ... argN) |
994 is enabled." |
994 is enabled." |
995 |
995 |
996 ^ AllowSqueakExtensions |
996 ^ AllowSqueakExtensions |
997 ! |
997 ! |
998 |
998 |
999 allowSqueakExtensions:aBoolean |
999 allowSqueakExtensions:aBoolean |
1000 "this allows turning on/off support for squeak extensions: |
1000 "this allows turning on/off support for squeak extensions: |
1001 computed arrays { .., } |
1001 computed arrays { .., } |
1002 c/java style arguments in message sends rec foo(arg1, ... argN) |
1002 c/java style arguments in message sends rec foo(arg1, ... argN) |
1003 |
1003 |
1004 If you want to fileIn Squeak classes, enable this with: |
1004 If you want to fileIn Squeak classes, enable this with: |
1005 Compiler allowSqueakComputedArrays:true" |
1005 Compiler allowSqueakComputedArrays:true" |
1006 |
1006 |
1007 AllowSqueakExtensions := aBoolean. |
1007 AllowSqueakExtensions := aBoolean. |
1008 |
1008 |
1009 " |
1009 " |
1010 self allowSqueakExtensions:true |
1010 self allowSqueakExtensions:true |
1034 "this allows turning on/off underscores in identifiers. |
1034 "this allows turning on/off underscores in identifiers. |
1035 If turned off (the default), underscores are not allowed in identifiers, |
1035 If turned off (the default), underscores are not allowed in identifiers, |
1036 but instead scanned as assignment character (old ST/80 syntax). |
1036 but instead scanned as assignment character (old ST/80 syntax). |
1037 If turned on, underscores are in identifiers are allowed, while extra |
1037 If turned on, underscores are in identifiers are allowed, while extra |
1038 underscores are still scanned as assignment. |
1038 underscores are still scanned as assignment. |
1039 If you have to fileIn old VW-Vsn2.x classes, |
1039 If you have to fileIn old VW-Vsn2.x classes, |
1040 turn them off with: |
1040 turn them off with: |
1041 Compiler allowUnderscoreInIdentifiers:false" |
1041 Compiler allowUnderscoreInIdentifiers:false" |
1042 |
1042 |
1043 AllowUnderscoreInIdentifier := aBoolean. |
1043 AllowUnderscoreInIdentifier := aBoolean. |
1044 |
1044 |
1045 "Modified: 7.9.1997 / 01:35:19 / cg" |
1045 "Modified: 7.9.1997 / 01:35:19 / cg" |
1046 ! |
1046 ! |
1074 ! |
1074 ! |
1075 |
1075 |
1076 allowVisualAgePrimitives |
1076 allowVisualAgePrimitives |
1077 "return true, if support for V'Age primitives is enabled." |
1077 "return true, if support for V'Age primitives is enabled." |
1078 |
1078 |
1079 ^ AllowVisualAgePrimitives |
1079 ^ AllowVisualAgePrimitives |
1080 |
1080 |
1081 " |
1081 " |
1082 AllowVisualAgePrimitives := true |
1082 AllowVisualAgePrimitives := true |
1083 AllowVisualAgePrimitives := false |
1083 AllowVisualAgePrimitives := false |
1084 " |
1084 " |
1134 |
1134 |
1135 !ParserFlags class methodsFor:'accessing-warning-control'! |
1135 !ParserFlags class methodsFor:'accessing-warning-control'! |
1136 |
1136 |
1137 warnAboutBadComments |
1137 warnAboutBadComments |
1138 "controls generation of warning messages about empty comments" |
1138 "controls generation of warning messages about empty comments" |
1139 |
1139 |
1140 ^ WarnAboutBadComments |
1140 ^ WarnAboutBadComments |
1141 ! |
1141 ! |
1142 |
1142 |
1143 warnAboutBadComments:aBoolean |
1143 warnAboutBadComments:aBoolean |
1144 "controls generation of warning messages about empty comments" |
1144 "controls generation of warning messages about empty comments" |
1145 |
1145 |
1146 WarnAboutBadComments := aBoolean |
1146 WarnAboutBadComments := aBoolean |
1147 ! |
1147 ! |
1148 |
1148 |
1149 warnAboutNonLowercaseLocalVariableNames |
1149 warnAboutNonLowercaseLocalVariableNames |
1150 "controls generation of warning messages about wrong variable names" |
1150 "controls generation of warning messages about wrong variable names" |
1151 |
1151 |
1152 ^ WarnAboutNonLowercaseLocalVariableNames |
1152 ^ WarnAboutNonLowercaseLocalVariableNames |
1153 ! |
1153 ! |
1154 |
1154 |
1155 warnAboutNonLowercaseLocalVariableNames:aBoolean |
1155 warnAboutNonLowercaseLocalVariableNames:aBoolean |
1156 "controls generation of warning messages about wrong variable names" |
1156 "controls generation of warning messages about wrong variable names" |
1157 |
1157 |
1158 WarnAboutNonLowercaseLocalVariableNames := aBoolean |
1158 WarnAboutNonLowercaseLocalVariableNames := aBoolean |
1159 ! |
1159 ! |
1160 |
1160 |
1161 warnAboutPeriodInSymbol |
1161 warnAboutPeriodInSymbol |
1162 ^ WarnAboutPeriodInSymbol |
1162 ^ WarnAboutPeriodInSymbol |
1163 ! |
1163 ! |
1164 |
1164 |
1165 warnAboutPeriodInSymbol:aBoolean |
1165 warnAboutPeriodInSymbol:aBoolean |
1166 WarnAboutPeriodInSymbol := aBoolean |
1166 WarnAboutPeriodInSymbol := aBoolean |
1167 ! |
1167 ! |
1168 |
1168 |
1169 warnAboutPossibleSTCCompilationProblems |
1169 warnAboutPossibleSTCCompilationProblems |
1170 ^ WarnAboutPossibleSTCCompilationProblems |
1170 ^ WarnAboutPossibleSTCCompilationProblems |
1185 warnAboutPossiblyUnimplementedSelectors:aBoolean |
1185 warnAboutPossiblyUnimplementedSelectors:aBoolean |
1186 WarnAboutPossiblyUnimplementedSelectors := aBoolean |
1186 WarnAboutPossiblyUnimplementedSelectors := aBoolean |
1187 ! |
1187 ! |
1188 |
1188 |
1189 warnAboutReferenceToPrivateClass |
1189 warnAboutReferenceToPrivateClass |
1190 "controls generation of warning messages when a private class is referenced" |
1190 "controls generation of warning messages when a private class is referenced" |
1191 |
1191 |
1192 ^ WarnAboutReferenceToPrivateClass |
1192 ^ WarnAboutReferenceToPrivateClass |
1193 ! |
1193 ! |
1194 |
1194 |
1195 warnAboutReferenceToPrivateClass:aBoolean |
1195 warnAboutReferenceToPrivateClass:aBoolean |
1196 "controls generation of warning messages when a private class is referenced" |
1196 "controls generation of warning messages when a private class is referenced" |
1197 |
1197 |
1198 WarnAboutReferenceToPrivateClass := aBoolean |
1198 WarnAboutReferenceToPrivateClass := aBoolean |
1199 ! |
1199 ! |
1200 |
1200 |
1201 warnAboutShortLocalVariableNames |
1201 warnAboutShortLocalVariableNames |
1202 "controls generation of warning messages about short variable names" |
1202 "controls generation of warning messages about short variable names" |
1203 |
1203 |
1204 ^ WarnAboutShortLocalVariableNames |
1204 ^ WarnAboutShortLocalVariableNames |
1205 ! |
1205 ! |
1206 |
1206 |
1207 warnAboutShortLocalVariableNames:aBoolean |
1207 warnAboutShortLocalVariableNames:aBoolean |
1208 "controls generation of warning messages about short variable names" |
1208 "controls generation of warning messages about short variable names" |
1209 |
1209 |
1210 WarnAboutShortLocalVariableNames := aBoolean |
1210 WarnAboutShortLocalVariableNames := aBoolean |
1211 ! |
1211 ! |
1212 |
1212 |
1213 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1213 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1214 "things like '\c:foo' instead of '\\c:foo' " |
1214 "things like '\c:foo' instead of '\\c:foo' " |
1215 |
1215 |
1216 ^ WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1216 ^ WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant |
1217 |
1217 |
1218 "Created: / 04-10-2011 / 19:54:57 / cg" |
1218 "Created: / 04-10-2011 / 19:54:57 / cg" |
1219 ! |
1219 ! |
1220 |
1220 |
1221 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean |
1221 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean |
1222 "things like '\c:foo' instead of '\\c:foo' " |
1222 "things like '\c:foo' instead of '\\c:foo' " |
1223 |
1223 |
1224 WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean |
1224 WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean |
1225 |
1225 |
1226 "Created: / 04-10-2011 / 19:54:42 / cg" |
1226 "Created: / 04-10-2011 / 19:54:42 / cg" |
1227 ! |
1227 ! |
1228 |
1228 |
1229 warnAboutVariableNameConventions |
1229 warnAboutVariableNameConventions |
1230 "controls generation of warning messages about wrong variable names" |
1230 "controls generation of warning messages about wrong variable names" |
1231 |
1231 |
1232 ^ WarnAboutVariableNameConventions |
1232 ^ WarnAboutVariableNameConventions |
1233 ! |
1233 ! |
1234 |
1234 |
1235 warnAboutVariableNameConventions:aBoolean |
1235 warnAboutVariableNameConventions:aBoolean |
1236 "controls generation of warning messages about wrong variable names" |
1236 "controls generation of warning messages about wrong variable names" |
1237 |
1237 |
1238 WarnAboutVariableNameConventions := aBoolean |
1238 WarnAboutVariableNameConventions := aBoolean |
1239 ! |
1239 ! |
1240 |
1240 |
1241 warnAboutWrongVariableNames |
1241 warnAboutWrongVariableNames |
1242 "controls generation of warning messages about wrong variable names" |
1242 "controls generation of warning messages about wrong variable names" |
1243 |
1243 |
1244 ^ WarnAboutWrongVariableNames |
1244 ^ WarnAboutWrongVariableNames |
1245 ! |
1245 ! |
1246 |
1246 |
1247 warnAboutWrongVariableNames:aBoolean |
1247 warnAboutWrongVariableNames:aBoolean |
1248 "controls generation of warning messages about wrong variable names" |
1248 "controls generation of warning messages about wrong variable names" |
1249 |
1249 |
1250 WarnAboutWrongVariableNames := aBoolean |
1250 WarnAboutWrongVariableNames := aBoolean |
1251 ! |
1251 ! |
1252 |
1252 |
1253 warnCommonMistakes |
1253 warnCommonMistakes |
1254 "return true, if common beginners mistakes are to be warned about" |
1254 "return true, if common beginners mistakes are to be warned about" |
1261 Those are not really errors in the strict sense, but often lead to |
1261 Those are not really errors in the strict sense, but often lead to |
1262 run time errors later. |
1262 run time errors later. |
1263 Examples are: expr or:expr2, where expr2 is not a block. |
1263 Examples are: expr or:expr2, where expr2 is not a block. |
1264 If you get bored by those warnings, turn them off by adding |
1264 If you get bored by those warnings, turn them off by adding |
1265 a line as: |
1265 a line as: |
1266 ParserFlags warnCommonMistakes:false |
1266 ParserFlags warnCommonMistakes:false |
1267 in your 'private.rc' file" |
1267 in your 'private.rc' file" |
1268 |
1268 |
1269 WarnCommonMistakes := aBoolean |
1269 WarnCommonMistakes := aBoolean |
1270 |
1270 |
1271 "Modified: / 05-09-2006 / 11:46:26 / cg" |
1271 "Modified: / 05-09-2006 / 11:46:26 / cg" |
1285 is portable to other smalltalk versions, which do not allow this |
1285 is portable to other smalltalk versions, which do not allow this |
1286 (i.e. VW releases 2.x and maybe others). |
1286 (i.e. VW releases 2.x and maybe others). |
1287 Notice, that dollars are NEVER allowed as the first character in an identifier. |
1287 Notice, that dollars are NEVER allowed as the first character in an identifier. |
1288 If you get bored by those warnings, turn them off by adding |
1288 If you get bored by those warnings, turn them off by adding |
1289 a line as: |
1289 a line as: |
1290 ParserFlags warnDollarInIdentifier:false |
1290 ParserFlags warnDollarInIdentifier:false |
1291 in your 'private.rc' file" |
1291 in your 'private.rc' file" |
1292 |
1292 |
1293 WarnDollarInIdentifier := aBoolean |
1293 WarnDollarInIdentifier := aBoolean |
1294 |
1294 |
1295 "Created: / 07-09-1997 / 01:37:42 / cg" |
1295 "Created: / 07-09-1997 / 01:37:42 / cg" |
1296 "Modified: / 05-09-2006 / 11:46:23 / cg" |
1296 "Modified: / 05-09-2006 / 11:46:23 / cg" |
1297 ! |
1297 ! |
1298 |
1298 |
1299 warnHiddenVariables |
1299 warnHiddenVariables |
1300 "controls generation of warning messages about hiding variables by locals" |
1300 "controls generation of warning messages about hiding variables by locals" |
1301 |
1301 |
1302 ^ WarnHiddenVariables |
1302 ^ WarnHiddenVariables |
1303 ! |
1303 ! |
1304 |
1304 |
1305 warnHiddenVariables:aBoolean |
1305 warnHiddenVariables:aBoolean |
1306 "controls generation of warning messages about hiding variables by locals" |
1306 "controls generation of warning messages about hiding variables by locals" |
1330 |
1330 |
1331 warnOldStyleAssignment:aBoolean |
1331 warnOldStyleAssignment:aBoolean |
1332 "this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax). |
1332 "this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax). |
1333 If you get bored by those warnings, turn them off by adding |
1333 If you get bored by those warnings, turn them off by adding |
1334 a line as: |
1334 a line as: |
1335 ParserFlags warnOldStyleAssignment:false |
1335 ParserFlags warnOldStyleAssignment:false |
1336 in your 'private.rc' file" |
1336 in your 'private.rc' file" |
1337 |
1337 |
1338 WarnOldStyleAssignment := aBoolean |
1338 WarnOldStyleAssignment := aBoolean |
1339 |
1339 |
1340 "Modified: / 05-09-2006 / 11:46:17 / cg" |
1340 "Modified: / 05-09-2006 / 11:46:17 / cg" |
1368 warnPossibleIncompatibilities:aBoolean |
1368 warnPossibleIncompatibilities:aBoolean |
1369 "this turns warnings about possible incompatibilities (with other ST systems) |
1369 "this turns warnings about possible incompatibilities (with other ST systems) |
1370 on or off. |
1370 on or off. |
1371 If you get bored by those warnings, turn them off by adding |
1371 If you get bored by those warnings, turn them off by adding |
1372 a line as: |
1372 a line as: |
1373 ParserFlags warnPossibleIncompatibilities:false |
1373 ParserFlags warnPossibleIncompatibilities:false |
1374 in your 'private.rc' file." |
1374 in your 'private.rc' file." |
1375 |
1375 |
1376 WarnPossibleIncompatibilities := aBoolean |
1376 WarnPossibleIncompatibilities := aBoolean |
1377 |
1377 |
1378 "Created: / 23-05-1997 / 12:02:45 / cg" |
1378 "Created: / 23-05-1997 / 12:02:45 / cg" |
1387 |
1387 |
1388 warnSTXSpecials:aBoolean |
1388 warnSTXSpecials:aBoolean |
1389 "this allows turning on/off warnings about stx specials. |
1389 "this allows turning on/off warnings about stx specials. |
1390 If you get bored by those warnings, turn them off by adding |
1390 If you get bored by those warnings, turn them off by adding |
1391 a line as: |
1391 a line as: |
1392 ParserFlags warnSTXSpecials:false |
1392 ParserFlags warnSTXSpecials:false |
1393 in your 'private.rc' file" |
1393 in your 'private.rc' file" |
1394 |
1394 |
1395 WarnSTXSpecials := aBoolean |
1395 WarnSTXSpecials := aBoolean |
1396 |
1396 |
1397 "Modified: / 05-09-2006 / 11:46:11 / cg" |
1397 "Modified: / 05-09-2006 / 11:46:11 / cg" |
1408 You may find those warnings useful, to make certain that your code |
1408 You may find those warnings useful, to make certain that your code |
1409 is portable to other smalltalk versions, which do not allow this |
1409 is portable to other smalltalk versions, which do not allow this |
1410 (i.e. VW releases 2.x). |
1410 (i.e. VW releases 2.x). |
1411 If you get bored by those warnings, turn them off by adding |
1411 If you get bored by those warnings, turn them off by adding |
1412 a line as: |
1412 a line as: |
1413 ParserFlags warnUnderscoreInIdentifier:false |
1413 ParserFlags warnUnderscoreInIdentifier:false |
1414 in your 'private.rc' file" |
1414 in your 'private.rc' file" |
1415 |
1415 |
1416 WarnUnderscoreInIdentifier := aBoolean |
1416 WarnUnderscoreInIdentifier := aBoolean |
1417 |
1417 |
1418 "Modified: / 05-09-2006 / 11:46:08 / cg" |
1418 "Modified: / 05-09-2006 / 11:46:08 / cg" |
1437 ! |
1437 ! |
1438 |
1438 |
1439 warnings:aBoolean |
1439 warnings:aBoolean |
1440 "this allows turning on/off all warnings; the default is on. |
1440 "this allows turning on/off all warnings; the default is on. |
1441 You can turn off warnings in your 'private.rc' file with |
1441 You can turn off warnings in your 'private.rc' file with |
1442 ParserFlags warnings:false |
1442 ParserFlags warnings:false |
1443 " |
1443 " |
1444 |
1444 |
1445 Warnings := aBoolean |
1445 Warnings := aBoolean |
1446 |
1446 |
1447 " |
1447 " |
1454 ! ! |
1454 ! ! |
1455 |
1455 |
1456 !ParserFlags class methodsFor:'class initialization'! |
1456 !ParserFlags class methodsFor:'class initialization'! |
1457 |
1457 |
1458 initialize |
1458 initialize |
1459 |executablePath| |
|
1460 |
|
1459 Warnings := true. |
1461 Warnings := true. |
1460 WarnUndeclared := true. |
1462 WarnUndeclared := true. |
1461 WarnUnusedVars := true. |
1463 WarnUnusedVars := true. |
1462 WarnSTXSpecials := false. |
1464 WarnSTXSpecials := false. |
1463 WarnST80Directives := false. |
1465 WarnST80Directives := false. |
1479 WarnAboutPeriodInSymbol := true. |
1481 WarnAboutPeriodInSymbol := true. |
1480 WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := false. |
1482 WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := false. |
1481 WarnPlausibilityChecks := true. |
1483 WarnPlausibilityChecks := true. |
1482 WarnAssignmentToBlockArgument := true. |
1484 WarnAssignmentToBlockArgument := true. |
1483 WarnAssignmentToMethodArgument := true. |
1485 WarnAssignmentToMethodArgument := true. |
1484 WarnAssignmentToPoolVariable := true. |
1486 WarnAssignmentToPoolVariable := true. |
1485 |
1487 |
1486 AllowReservedWordsAsSelectors := false. |
1488 AllowReservedWordsAsSelectors := false. |
1487 AllowUnderscoreInIdentifier := true. |
1489 AllowUnderscoreInIdentifier := true. |
1488 AllowDollarInIdentifier := false. "/ st80-vms dollars in identifiers |
1490 AllowDollarInIdentifier := false. "/ st80-vms dollars in identifiers |
1489 AllowOldStyleAssignment := true. "/ st80 underscore as assignment |
1491 AllowOldStyleAssignment := true. "/ st80 underscore as assignment |
1490 AllowDolphinExtensions := false. "/ dolphin computed literal |
1492 AllowDolphinExtensions := false. "/ dolphin computed literal |
1491 AllowQualifiedNames := false. "/ vw3 qualified names |
1493 AllowQualifiedNames := false. "/ vw3 qualified names |
1492 AllowExtendedBinarySelectors := false. "/ vw5.4 extended binary selectors (plus/minus, center-dot etc.) |
1494 AllowExtendedBinarySelectors := false. "/ vw5.4 extended binary selectors (plus/minus, center-dot etc.) |
1516 AllowVisualWorksMethodAnnotations := false. |
1518 AllowVisualWorksMethodAnnotations := false. |
1517 AllowPossibleSTCCompilationProblems := true. |
1519 AllowPossibleSTCCompilationProblems := true. |
1518 AllowEmptyStatements := false. |
1520 AllowEmptyStatements := false. |
1519 AllowPeriodInSymbol := false. |
1521 AllowPeriodInSymbol := false. |
1520 "/ these are only used by the new compiler |
1522 "/ these are only used by the new compiler |
1521 AllowUnicodeStrings := false. |
1523 AllowUnicodeStrings := false. |
1522 AllowUnicodeCharacters := false. |
1524 AllowUnicodeCharacters := false. |
1523 AllowCharacterEscapes := false. |
1525 AllowCharacterEscapes := false. |
1524 AllowStringEscapes := false. |
1526 AllowStringEscapes := false. |
1525 AllowAssignmentToBlockArgument := false. |
1527 AllowAssignmentToBlockArgument := false. |
1526 AllowAssignmentToMethodArgument := false. |
1528 AllowAssignmentToMethodArgument := false. |
1544 DefineForGNUC := '__GNUC__'. |
1546 DefineForGNUC := '__GNUC__'. |
1545 DefineForMINGW := '__MINGW__'. |
1547 DefineForMINGW := '__MINGW__'. |
1546 DefineForMINGW32 := '__MINGW32__'. |
1548 DefineForMINGW32 := '__MINGW32__'. |
1547 DefineForMINGW64 := '__MINGW64__'. |
1549 DefineForMINGW64 := '__MINGW64__'. |
1548 |
1550 |
1549 self initializeSTCFlagsForTopDirectory: |
1551 (executablePath := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[ |
1550 OperatingSystem pathOfSTXExecutable asFilename directory directory directory. |
1552 executablePath := executablePath asFilename directory. |
1553 (((executablePath / 'include') exists and:[(executablePath / 'stc') exists]) |
|
1554 or:[ |
|
1555 executablePath := executablePath directory. |
|
1556 ((executablePath / 'include') exists and:[(executablePath / 'stc') exists]) |
|
1557 or:[ |
|
1558 executablePath := executablePath directory. |
|
1559 ((executablePath / 'include') exists and:[(executablePath / 'stc') exists]) |
|
1560 ] |
|
1561 ] |
|
1562 ) ifTrue:[ |
|
1563 self initializeSTCFlagsForTopDirectory: executablePath. |
|
1564 ] |
|
1565 ]. |
|
1551 |
1566 |
1552 " |
1567 " |
1553 ParserFlags initialize |
1568 ParserFlags initialize |
1554 " |
1569 " |
1555 |
1570 |
1564 |
1579 |
1565 |topDir topDirName vcTop sdkTop bccTop useBorlandC useVisualC useMingw m32| |
1580 |topDir topDirName vcTop sdkTop bccTop useBorlandC useVisualC useMingw m32| |
1566 |
1581 |
1567 topDir := topDirArg. |
1582 topDir := topDirArg. |
1568 OperatingSystem isMSWINDOWSlike ifTrue:[ |
1583 OperatingSystem isMSWINDOWSlike ifTrue:[ |
1569 topDirArg isString ifTrue:[ |
1584 topDirArg isString ifTrue:[ |
1570 topDir := topDirArg copyReplaceAll:$/ with:$\. |
1585 topDir := topDirArg copyReplaceAll:$/ with:$\. |
1571 ] |
1586 ] |
1572 ]. |
1587 ]. |
1573 topDir := topDir asFilename. |
1588 topDir := topDir asFilename. |
1574 topDirName := topDir name. |
1589 topDirName := topDir name. |
1575 |
1590 |
1576 "/ if in the development directory, use ./modules |
1591 "/ if in the development directory, use ./modules |
1577 Smalltalk isSmalltalkDevelopmentSystem ifTrue:[ |
1592 Smalltalk isSmalltalkDevelopmentSystem ifTrue:[ |
1578 STCModulePath := 'modules'. |
1593 STCModulePath := 'modules'. |
1579 ] ifFalse:[ |
1594 ] ifFalse:[ |
1580 STCModulePath := Filename tempDirectory constructString:'modules'. |
1595 STCModulePath := Filename tempDirectory constructString:'modules'. |
1581 ]. |
1596 ]. |
1582 |
1597 |
1583 (topDir construct:'stc') exists ifFalse:[ |
1598 (topDir construct:'stc') exists ifFalse:[ |
1584 ('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR. |
1599 ('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR. |
1585 'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR. |
1600 'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR. |
1586 STCCompilation := #never. |
1601 STCCompilation := #never. |
1587 ]. |
1602 ]. |
1588 |
1603 |
1589 OperatingSystem isMSWINDOWSlike ifTrue:[ |
1604 OperatingSystem isMSWINDOWSlike ifTrue:[ |
1590 useBorlandC := useVisualC := useMingw := false. |
1605 useBorlandC := useVisualC := useMingw := false. |
1591 |
1606 |
1592 STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'. |
1607 STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'. |
1593 (bccTop := BCCTop) isNil ifTrue:[ |
1608 (bccTop := BCCTop) isNil ifTrue:[ |
1594 bccTop := #( |
1609 bccTop := #( |
1595 'C:\Borland\bcc55' |
1610 'C:\Borland\bcc55' |
1596 ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil. |
1611 ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil. |
1597 ]. |
1612 ]. |
1598 |
1613 |
1599 (bccTop notNil and:[bccTop asFilename exists]) ifTrue:[ |
1614 (bccTop notNil and:[bccTop asFilename exists]) ifTrue:[ |
1600 STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'. |
1615 STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'. |
1601 LibDirectory := topDirName,'\lib\bc'. |
1616 LibDirectory := topDirName,'\lib\bc'. |
1602 LinkArgs := '-L',topDirName,'\lib\bc'. |
1617 LinkArgs := '-L',topDirName,'\lib\bc'. |
1603 LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'. |
1618 LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'. |
1604 CCPath := 'bcc32'. |
1619 CCPath := 'bcc32'. |
1605 MakeCommand := 'bmake'. |
1620 MakeCommand := 'bmake'. |
1606 LinkCommand := 'ilink32'. |
1621 LinkCommand := 'ilink32'. |
1607 CCCompilationOptions := '-w-'. |
1622 CCCompilationOptions := '-w-'. |
1608 useBorlandC := true. |
1623 useBorlandC := true. |
1609 ] ifFalse:[ |
1624 ] ifFalse:[ |
1610 (vcTop := VCTop) isNil ifTrue:[ |
1625 (vcTop := VCTop) isNil ifTrue:[ |
1611 vcTop := #( |
1626 vcTop := #( |
1612 'C:\Program Files\Microsoft Visual Studio 11.0\VC' |
1627 'C:\Program Files\Microsoft Visual Studio 11.0\VC' |
1613 'C:\Program Files\Microsoft Visual Studio 10.0\VC' |
1628 'C:\Program Files\Microsoft Visual Studio 10.0\VC' |
1614 'C:\Program Files\Microsoft Visual Studio 9.0\VC' |
1629 'C:\Program Files\Microsoft Visual Studio 9.0\VC' |
1615 ) detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] ifNone:nil. |
1630 ) detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] ifNone:nil. |
1616 ]. |
1631 ]. |
1617 (vcTop notNil and:[vcTop asFilename exists]) ifTrue:[ |
1632 (vcTop notNil and:[vcTop asFilename exists]) ifTrue:[ |
1618 useVisualC := true. |
1633 useVisualC := true. |
1619 STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'. |
1634 STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'. |
1620 |
1635 |
1621 (sdkTop := SDKTop) isNil ifTrue:[ |
1636 (sdkTop := SDKTop) isNil ifTrue:[ |
1622 sdkTop := #( |
1637 sdkTop := #( |
1623 'C:\Program Files\Microsoft SDKs\Windows\v7.0A' |
1638 'C:\Program Files\Microsoft SDKs\Windows\v7.0A' |
1624 'C:\Program Files\Microsoft SDKs\Windows\v6.0A' |
1639 'C:\Program Files\Microsoft SDKs\Windows\v6.0A' |
1625 ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil. |
1640 ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil. |
1626 ]. |
1641 ]. |
1627 (sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[ |
1642 (sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[ |
1628 STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'. |
1643 STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'. |
1629 ]. |
1644 ]. |
1630 LibDirectory := topDirName,'\lib\vc'. |
1645 LibDirectory := topDirName,'\lib\vc'. |
1631 LinkArgs := '-L',topDirName,'\lib\vc'. |
1646 LinkArgs := '-L',topDirName,'\lib\vc'. |
1632 LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
1647 LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
1633 CCPath := vcTop,'\bin\cl.exe'. |
1648 CCPath := vcTop,'\bin\cl.exe'. |
1634 LinkCommand := 'ilink32'. |
1649 LinkCommand := 'ilink32'. |
1635 MakeCommand := 'vcmake'. |
1650 MakeCommand := 'vcmake'. |
1636 CCCompilationOptions := '/nologo /ZI /w /GF /EHsc /FR.\objvc\'. |
1651 CCCompilationOptions := '/nologo /ZI /w /GF /EHsc /FR.\objvc\'. |
1637 ] ifFalse:[ |
1652 ] ifFalse:[ |
1638 "/ add definitions for lcc, mingc etc. |
1653 "/ add definitions for lcc, mingc etc. |
1639 STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'. |
1654 STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'. |
1640 LibDirectory := topDirName,'\lib\vc'. |
1655 LibDirectory := topDirName,'\lib\vc'. |
1641 LinkArgs := '-L',topDirName,'\lib\vc'. |
1656 LinkArgs := '-L',topDirName,'\lib\vc'. |
1642 LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
1657 LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'. |
1643 ]. |
1658 ]. |
1644 ]. |
1659 ]. |
1645 STCCompilationDefines := '-DWIN32'. |
1660 STCCompilationDefines := '-DWIN32'. |
1646 STCCompilationOptions := '+optinline +inlineNew'. |
1661 STCCompilationOptions := '+optinline +inlineNew'. |
1647 (topDirName,'\stc\stc.exe') asFilename exists ifTrue:[ |
1662 (topDirName,'\stc\stc.exe') asFilename exists ifTrue:[ |
1648 STCPath := (topDirName,'\stc\stc.exe'). |
1663 STCPath := (topDirName,'\stc\stc.exe'). |
1649 ] ifFalse:[ |
1664 ] ifFalse:[ |
1650 STCPath := 'stc.exe'. |
1665 STCPath := 'stc.exe'. |
1651 ]. |
1666 ]. |
1652 LibPath := ''. |
1667 LibPath := ''. |
1653 SearchedLibraries := #('import32.lib'). |
1668 SearchedLibraries := #('import32.lib'). |
1654 "/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib'). |
1669 "/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib'). |
1655 ] ifFalse:[ |
1670 ] ifFalse:[ |
1656 STCCompilationIncludes := '-I',topDirName,'/include'. |
1671 STCCompilationIncludes := '-I',topDirName,'/include'. |
1657 STCCompilationDefines := ''. |
1672 STCCompilationDefines := ''. |
1658 STCCompilationOptions := '+optinline +inlineNew'. |
1673 STCCompilationOptions := '+optinline +inlineNew'. |
1659 STCPath := topDirName,'/stc/stc'. |
1674 STCPath := topDirName,'/stc/stc'. |
1660 |
1675 |
1661 m32 := ''. |
1676 m32 := ''. |
1662 (ExternalAddress pointerSize == 4) ifTrue:[ |
1677 (ExternalAddress pointerSize == 4) ifTrue:[ |
1663 m32 := ' -m32' |
1678 m32 := ' -m32' |
1664 ]. |
1679 ]. |
1665 CCCompilationOptions := OperatingSystem getCPUDefine, |
1680 CCCompilationOptions := OperatingSystem getCPUDefine, |
1666 ' -D', self usedCompilerDefine, |
1681 ' -D', self usedCompilerDefine, |
1667 ' ', OperatingSystem getOSDefine, |
1682 ' ', OperatingSystem getOSDefine, |
1668 ' ', '-O', m32. |
1683 ' ', '-O', m32. |
1669 ParserFlags useGnuC ifTrue:[ |
1684 ParserFlags useGnuC ifTrue:[ |
1670 CCPath := 'gcc' |
1685 CCPath := 'gcc' |
1671 ] ifFalse:[ |
1686 ] ifFalse:[ |
1672 CCPath := 'cc' |
1687 CCPath := 'cc' |
1673 ]. |
1688 ]. |
1674 LinkArgs := m32. |
1689 LinkArgs := m32. |
1675 LinkSharedArgs := '-shared', m32. |
1690 LinkSharedArgs := '-shared', m32. |
1676 LinkCommand := CCPath. |
1691 LinkCommand := CCPath. |
1677 LibPath := ''. |
1692 LibPath := ''. |
1678 SearchedLibraries := #(). |
1693 SearchedLibraries := #(). |
1679 MakeCommand := 'make'. |
1694 MakeCommand := 'make'. |
1680 ]. |
1695 ]. |
1681 |
1696 |
1682 " |
1697 " |
1683 ParserFlags initializeSTCFlagsForTopDirectory:'../..' |
1698 ParserFlags initializeSTCFlagsForTopDirectory:'../..' |
1684 " |
1699 " |
2128 "Created: / 23-05-2011 / 17:43:45 / cg" |
2143 "Created: / 23-05-2011 / 17:43:45 / cg" |
2129 ! |
2144 ! |
2130 |
2145 |
2131 allowSqueakExtensions |
2146 allowSqueakExtensions |
2132 "return true, if support for squeak extensions |
2147 "return true, if support for squeak extensions |
2133 computed arrays { .., } |
2148 computed arrays { .., } |
2134 c/java style arguments in message sends rec foo(arg1, ... argN) |
2149 c/java style arguments in message sends rec foo(arg1, ... argN) |
2135 is enabled." |
2150 is enabled." |
2136 |
2151 |
2137 ^ allowSqueakExtensions |
2152 ^ allowSqueakExtensions |
2138 ! |
2153 ! |
2139 |
2154 |
2140 allowSqueakExtensions:aBoolean |
2155 allowSqueakExtensions:aBoolean |
2141 "this allows turning on/off support for squeak extensions: |
2156 "this allows turning on/off support for squeak extensions: |
2142 computed arrays { .., } |
2157 computed arrays { .., } |
2143 c/java style arguments in message sends rec foo(arg1, ... argN) |
2158 c/java style arguments in message sends rec foo(arg1, ... argN) |
2144 " |
2159 " |
2145 |
2160 |
2146 allowSqueakExtensions := aBoolean |
2161 allowSqueakExtensions := aBoolean |
2147 ! |
2162 ! |
2148 |
2163 |
2303 warnAboutPossiblyUnimplementedSelectors:aBoolean |
2318 warnAboutPossiblyUnimplementedSelectors:aBoolean |
2304 warnAboutPossiblyUnimplementedSelectors := aBoolean. |
2319 warnAboutPossiblyUnimplementedSelectors := aBoolean. |
2305 ! |
2320 ! |
2306 |
2321 |
2307 warnAboutReferenceToPrivateClass |
2322 warnAboutReferenceToPrivateClass |
2308 "controls generation of warning messages when a private class is referenced" |
2323 "controls generation of warning messages when a private class is referenced" |
2309 |
2324 |
2310 ^ warnAboutReferenceToPrivateClass |
2325 ^ warnAboutReferenceToPrivateClass |
2311 ! |
2326 ! |
2312 |
2327 |
2313 warnAboutReferenceToPrivateClass:aBoolean |
2328 warnAboutReferenceToPrivateClass:aBoolean |
2314 "controls generation of warning messages when a private class is referenced" |
2329 "controls generation of warning messages when a private class is referenced" |
2315 |
2330 |
2316 warnAboutReferenceToPrivateClass := aBoolean |
2331 warnAboutReferenceToPrivateClass := aBoolean |
2317 ! |
2332 ! |
2318 |
2333 |
2319 warnAboutShortLocalVariableNames |
2334 warnAboutShortLocalVariableNames |
2527 warnAboutPeriodInSymbol := WarnAboutPeriodInSymbol. |
2542 warnAboutPeriodInSymbol := WarnAboutPeriodInSymbol. |
2528 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant := WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant. |
2543 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant := WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant. |
2529 warnPlausibilityChecks := WarnPlausibilityChecks. |
2544 warnPlausibilityChecks := WarnPlausibilityChecks. |
2530 warnAssignmentToBlockArgument := WarnAssignmentToBlockArgument. |
2545 warnAssignmentToBlockArgument := WarnAssignmentToBlockArgument. |
2531 warnAssignmentToMethodArgument := WarnAssignmentToMethodArgument. |
2546 warnAssignmentToMethodArgument := WarnAssignmentToMethodArgument. |
2532 warnAssignmentToPoolVariable := WarnAssignmentToPoolVariable. |
2547 warnAssignmentToPoolVariable := WarnAssignmentToPoolVariable. |
2533 |
2548 |
2534 allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier. |
2549 allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier. |
2535 allowDollarInIdentifier := AllowDollarInIdentifier. |
2550 allowDollarInIdentifier := AllowDollarInIdentifier. |
2536 allowOldStyleAssignment := AllowOldStyleAssignment. |
2551 allowOldStyleAssignment := AllowOldStyleAssignment. |
2537 allowSqueakExtensions := AllowSqueakExtensions. |
2552 allowSqueakExtensions := AllowSqueakExtensions. |
2602 ! ! |
2617 ! ! |
2603 |
2618 |
2604 !ParserFlags class methodsFor:'documentation'! |
2619 !ParserFlags class methodsFor:'documentation'! |
2605 |
2620 |
2606 version |
2621 version |
2607 ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.114 2014-02-28 14:17:02 cg Exp $' |
2622 ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.115 2014-02-28 21:46:54 cg Exp $' |
2608 ! |
2623 ! |
2609 |
2624 |
2610 version_CVS |
2625 version_CVS |
2611 ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.114 2014-02-28 14:17:02 cg Exp $' |
2626 ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.115 2014-02-28 21:46:54 cg Exp $' |
2612 ! ! |
2627 ! ! |
2613 |
2628 |
2614 |
2629 |
2615 ParserFlags initialize! |
2630 ParserFlags initialize! |