ParserFlags.st
changeset 4430 25c8c1a7a28b
parent 4428 a04104250af7
child 4436 2183c928b524
equal deleted inserted replaced
4429:13faa6fe3a82 4430:25c8c1a7a28b
    60 		allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument
    60 		allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument
    61 		warnAssignmentToMethodArgument warnAssignmentToPoolVariable
    61 		warnAssignmentToMethodArgument warnAssignmentToPoolVariable
    62 		allowSignedByteArrayElements allowSymbolsStartingWithDigit
    62 		allowSignedByteArrayElements allowSymbolsStartingWithDigit
    63 		allowJavaScriptConst allowPeriodAsNameSpaceSeparator
    63 		allowJavaScriptConst allowPeriodAsNameSpaceSeparator
    64 		allowCStrings warnAboutPossiblyUninitializedLocals allowEStrings
    64 		allowCStrings warnAboutPossiblyUninitializedLocals allowEStrings
    65 		singlePrecisionFloatF'
    65 		singlePrecisionFloatF allowRStrings'
    66 	classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument
    66 	classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument
    67 		AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable
    67 		AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable
    68 		AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier
    68 		AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier
    69 		AllowDolphinExtensions AllowDomainVariables AllowEmptyStatements
    69 		AllowDolphinExtensions AllowDomainVariables AllowEmptyStatements
    70 		AllowExtendedBinarySelectors AllowExtendedSTXSyntax
    70 		AllowExtendedBinarySelectors AllowExtendedSTXSyntax
   108 		WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings
   108 		WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings
   109 		AutoDefineVariables AllowSignedByteArrayElements
   109 		AutoDefineVariables AllowSignedByteArrayElements
   110 		AllowSymbolsStartingWithDigit AllowJavaScriptConst
   110 		AllowSymbolsStartingWithDigit AllowJavaScriptConst
   111 		AllowJavaScriptLet AllowPeriodAsNameSpaceSeparator AllowCStrings
   111 		AllowJavaScriptLet AllowPeriodAsNameSpaceSeparator AllowCStrings
   112 		WarnAboutPossiblyUninitializedLocals AllowEStrings
   112 		WarnAboutPossiblyUninitializedLocals AllowEStrings
   113 		SinglePrecisionFloatF'
   113 		SinglePrecisionFloatF AllowRStrings'
   114 	poolDictionaries:''
   114 	poolDictionaries:''
   115 	category:'System-Compiler'
   115 	category:'System-Compiler'
   116 !
   116 !
   117 
   117 
   118 !ParserFlags class methodsFor:'documentation'!
   118 !ParserFlags class methodsFor:'documentation'!
  1222 
  1222 
  1223     "
  1223     "
  1224      self allowQualifiedNames:true
  1224      self allowQualifiedNames:true
  1225      self allowQualifiedNames:false
  1225      self allowQualifiedNames:false
  1226     "
  1226     "
       
  1227 !
       
  1228 
       
  1229 allowRStrings
       
  1230     "rstrings have the syntax:
       
  1231         r'...'
       
  1232      which generates a regex"
       
  1233         
       
  1234     ^ AllowRStrings
       
  1235 
       
  1236     "Created: / 03-06-2019 / 11:12:11 / Claus Gittinger"
       
  1237 !
       
  1238 
       
  1239 allowRStrings:aBoolean
       
  1240     "rstrings have the syntax:
       
  1241         r'...'
       
  1242      which generates a regex"
       
  1243         
       
  1244     AllowRStrings := aBoolean
       
  1245 
       
  1246     "Created: / 03-06-2019 / 11:12:37 / Claus Gittinger"
  1227 !
  1247 !
  1228 
  1248 
  1229 allowReservedWordsAsSelectors
  1249 allowReservedWordsAsSelectors
  1230     "return true, if self, super, thisContext, nil, true and false are to be allowed
  1250     "return true, if self, super, thisContext, nil, true and false are to be allowed
  1231      as unary message selectors."
  1251      as unary message selectors."
  1981     AllowPeriodInSymbol := false.
  2001     AllowPeriodInSymbol := false.
  1982     AllowPeriodAsNameSpaceSeparator := false.
  2002     AllowPeriodAsNameSpaceSeparator := false.
  1983     "/ these are only used by the new compiler
  2003     "/ these are only used by the new compiler
  1984     AllowCStrings := true.                     "/ c'...' syntax
  2004     AllowCStrings := true.                     "/ c'...' syntax
  1985     AllowEStrings := false.                    "/ e'...' syntax
  2005     AllowEStrings := false.                    "/ e'...' syntax
       
  2006     AllowRStrings := false.                    "/ r'...' syntax
  1986     AllowUnicodeStrings := false.
  2007     AllowUnicodeStrings := false.
  1987     AllowUnicodeCharacters := false.
  2008     AllowUnicodeCharacters := false.
  1988     AllowCharacterEscapes := false.
  2009     AllowCharacterEscapes := false.
  1989     AllowStringEscapes := false.
  2010     AllowStringEscapes := false.
  1990     AllowAssignmentToBlockArgument := false.
  2011     AllowAssignmentToBlockArgument := false.
  2071     "
  2092     "
  2072 
  2093 
  2073     "Modified: / 09-08-2006 / 18:47:18 / fm"
  2094     "Modified: / 09-08-2006 / 18:47:18 / fm"
  2074     "Modified: / 08-08-2017 / 23:49:41 / cg"
  2095     "Modified: / 08-08-2017 / 23:49:41 / cg"
  2075     "Modified (comment): / 11-05-2018 / 10:12:29 / stefan"
  2096     "Modified (comment): / 11-05-2018 / 10:12:29 / stefan"
  2076     "Modified: / 26-05-2019 / 11:32:55 / Claus Gittinger"
  2097     "Modified: / 03-06-2019 / 11:12:55 / Claus Gittinger"
  2077 !
  2098 !
  2078 
  2099 
  2079 initializeSTCFlagsForTopDirectory:topDirArg
  2100 initializeSTCFlagsForTopDirectory:topDirArg
  2080     "topDirArg must be the stx directory (where stc directory with stc-executable is found)
  2101     "topDirArg must be the stx directory (where stc directory with stc-executable is found)
  2081      notice: for now, can only initialize for borland+windows or linux;
  2102      notice: for now, can only initialize for borland+windows or linux;
  2935     allowQualifiedNames := aBoolean.
  2956     allowQualifiedNames := aBoolean.
  2936 
  2957 
  2937     "Modified (comment): / 09-02-2019 / 15:53:11 / Claus Gittinger"
  2958     "Modified (comment): / 09-02-2019 / 15:53:11 / Claus Gittinger"
  2938 !
  2959 !
  2939 
  2960 
       
  2961 allowRStrings
       
  2962     "rstrings have the syntax:
       
  2963         r'...'
       
  2964      which generates a regex"
       
  2965 
       
  2966     ^ allowRStrings ? false.
       
  2967 
       
  2968     "Created: / 03-06-2019 / 11:11:25 / Claus Gittinger"
       
  2969 !
       
  2970 
       
  2971 allowRStrings:aBoolean
       
  2972     "rstrings have the syntax:
       
  2973         r'...'
       
  2974      which generates a regex"
       
  2975 
       
  2976     allowRStrings := aBoolean
       
  2977 
       
  2978     "Created: / 03-06-2019 / 11:11:51 / Claus Gittinger"
       
  2979 !
       
  2980 
  2940 allowReservedWordsAsSelectors
  2981 allowReservedWordsAsSelectors
  2941     ^ allowReservedWordsAsSelectors
  2982     ^ allowReservedWordsAsSelectors
  2942 !
  2983 !
  2943 
  2984 
  2944 allowReservedWordsAsSelectors:aBoolean
  2985 allowReservedWordsAsSelectors:aBoolean
  3605     allowPeriodAsNameSpaceSeparator := AllowPeriodAsNameSpaceSeparator.
  3646     allowPeriodAsNameSpaceSeparator := AllowPeriodAsNameSpaceSeparator.
  3606     
  3647     
  3607     "/ these are only supported in the new compiler
  3648     "/ these are only supported in the new compiler
  3608     allowCStrings := AllowCStrings.
  3649     allowCStrings := AllowCStrings.
  3609     allowEStrings := AllowEStrings.
  3650     allowEStrings := AllowEStrings.
       
  3651     allowRStrings := AllowRStrings.
  3610     allowUnicodeStrings := AllowUnicodeStrings.
  3652     allowUnicodeStrings := AllowUnicodeStrings.
  3611     allowUnicodeCharacters := AllowUnicodeCharacters.
  3653     allowUnicodeCharacters := AllowUnicodeCharacters.
  3612     allowCharacterEscapes := AllowCharacterEscapes.
  3654     allowCharacterEscapes := AllowCharacterEscapes.
  3613     allowStringEscapes := AllowStringEscapes.
  3655     allowStringEscapes := AllowStringEscapes.
  3614     allowAssignmentToBlockArgument := AllowAssignmentToBlockArgument.
  3656     allowAssignmentToBlockArgument := AllowAssignmentToBlockArgument.
  3644      ParserFlags initialize.
  3686      ParserFlags initialize.
  3645      self new inspect.
  3687      self new inspect.
  3646     "
  3688     "
  3647 
  3689 
  3648     "Modified: / 08-08-2017 / 23:50:01 / cg"
  3690     "Modified: / 08-08-2017 / 23:50:01 / cg"
  3649     "Modified: / 26-05-2019 / 11:33:14 / Claus Gittinger"
  3691     "Modified: / 03-06-2019 / 11:13:07 / Claus Gittinger"
  3650 ! !
  3692 ! !
  3651 
  3693 
  3652 !ParserFlags class methodsFor:'documentation'!
  3694 !ParserFlags class methodsFor:'documentation'!
  3653 
  3695 
  3654 version
  3696 version