ParserFlags.st
changeset 1950 acec00884e5a
parent 1947 a5429732842a
child 2011 25a6ebc4a173
equal deleted inserted replaced
1949:709ca062cf98 1950:acec00884e5a
    34 		allowLazyValueExtension allowFixedPointLiterals
    34 		allowLazyValueExtension allowFixedPointLiterals
    35 		allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals
    35 		allowExtendedSTXSyntax allowVisualAgeESSymbolLiterals
    36 		allowExtensionsToPrivateClasses allowSqueakPrimitives
    36 		allowExtensionsToPrivateClasses allowSqueakPrimitives
    37 		allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions
    37 		allowVisualAgePrimitives allowSTVPrimitives allowSTVExtensions
    38 		allowNationalCharactersInIdentifier allowHashAsBinarySelector
    38 		allowNationalCharactersInIdentifier allowHashAsBinarySelector
    39 		allowSTXEOLComments arraysAreImmutable stringsAreImmutable
    39 		allowSTXEOLComments allowEmptyStatements
    40 		implicitSelfSends stcKeepCIntermediate stcKeepOIntermediate
    40 		allowVisualWorksMethodAnnotations
    41 		stcKeepSTIntermediate stcModulePath stcCompilation
    41 		allowPossibleSTCCompilationProblems arraysAreImmutable
    42 		stcCompilationIncludes stcCompilationDefines
    42 		stringsAreImmutable implicitSelfSends stcKeepCIntermediate
       
    43 		stcKeepOIntermediate stcKeepSTIntermediate stcModulePath
       
    44 		stcCompilation stcCompilationIncludes stcCompilationDefines
    43 		stcCompilationOptions stcPath ccCompilationOptions ccPath
    45 		stcCompilationOptions stcPath ccCompilationOptions ccPath
    44 		linkArgs linkSharedArgs linkCommand libPath searchedLibraries
    46 		linkArgs linkSharedArgs linkCommand libPath searchedLibraries'
    45 		allowVisualWorksMethodAnnotations
       
    46 		allowPossibleSTCCompilationProblems'
       
    47 	classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared
    47 	classVariableNames:'WarnST80Directives WarnUnusedVars WarnUndeclared
    48 		WarnAboutWrongVariableNames WarnAboutBadComments
    48 		WarnAboutWrongVariableNames WarnAboutBadComments
    49 		WarnAboutVariableNameConventions WarnSTXSpecials
    49 		WarnAboutVariableNameConventions WarnSTXSpecials
    50 		WarnOldStyleAssignment WarnUnderscoreInIdentifier
    50 		WarnOldStyleAssignment WarnUnderscoreInIdentifier
    51 		WarnCommonMistakes WarnPossibleIncompatibilities
    51 		WarnCommonMistakes WarnPossibleIncompatibilities
    52 		WarnDollarInIdentifier WarnHiddenVariables
    52 		WarnDollarInIdentifier WarnHiddenVariables
    53 		WarnAboutNonLowercaseLocalVariableNames
    53 		WarnAboutNonLowercaseLocalVariableNames
    54 		WarnInconsistentReturnValues Warnings AllowUnderscoreInIdentifier
    54 		WarnInconsistentReturnValues Warnings
       
    55 		WarnAboutPossibleSTCCompilationProblems
       
    56 		AllowUnderscoreInIdentifier
    55 		AllowFunctionCallSyntaxForBlockEvaluation AllowLazyValueExtension
    57 		AllowFunctionCallSyntaxForBlockEvaluation AllowLazyValueExtension
    56 		AllowVariableReferences AllowReservedWordsAsSelectors
    58 		AllowVariableReferences AllowReservedWordsAsSelectors
    57 		AllowLocalVariableDeclarationWithInitializerExpression
    59 		AllowLocalVariableDeclarationWithInitializerExpression
    58 		AllowArrayIndexSyntaxExtension AllowDomainVariables
    60 		AllowArrayIndexSyntaxExtension AllowDomainVariables
    59 		AllowDollarInIdentifier AllowSqueakExtensions AllowQualifiedNames
    61 		AllowDollarInIdentifier AllowSqueakExtensions AllowQualifiedNames
    61 		AllowExtendedBinarySelectors AllowExtendedSTXSyntax
    63 		AllowExtendedBinarySelectors AllowExtendedSTXSyntax
    62 		AllowFixedPointLiterals AllowLiteralNameSpaceSymbols
    64 		AllowFixedPointLiterals AllowLiteralNameSpaceSymbols
    63 		AllowVisualAgeESSymbolLiterals AllowExtensionsToPrivateClasses
    65 		AllowVisualAgeESSymbolLiterals AllowExtensionsToPrivateClasses
    64 		AllowSqueakPrimitives AllowVisualAgePrimitives AllowSTVPrimitives
    66 		AllowSqueakPrimitives AllowVisualAgePrimitives AllowSTVPrimitives
    65 		AllowSTVExtensions AllowNationalCharactersInIdentifier
    67 		AllowSTVExtensions AllowNationalCharactersInIdentifier
    66 		AllowHashAsBinarySelector AllowSTXEOLComments ArraysAreImmutable
    68 		AllowHashAsBinarySelector AllowSTXEOLComments
       
    69 		AllowPossibleSTCCompilationProblems AllowEmptyStatements
       
    70 		AllowVisualWorksMethodAnnotations ArraysAreImmutable
    67 		StringsAreImmutable ImplicitSelfSends STCModulePath
    71 		StringsAreImmutable ImplicitSelfSends STCModulePath
    68 		STCKeepCIntermediate STCKeepOIntermediate STCKeepSTIntermediate
    72 		STCKeepCIntermediate STCKeepOIntermediate STCKeepSTIntermediate
    69 		STCCompilation STCCompilationIncludes STCCompilationDefines
    73 		STCCompilation STCCompilationIncludes STCCompilationDefines
    70 		STCCompilationOptions STCPath CCCompilationOptions CCPath
    74 		STCCompilationOptions STCPath CCCompilationOptions CCPath
    71 		LinkArgs LinkSharedArgs LinkCommand LibPath SearchedLibraries
    75 		LinkArgs LinkSharedArgs LinkCommand LibPath SearchedLibraries
    72 		AllowVisualWorksMethodAnnotations MakeCommand
    76 		MakeCommand'
    73 		AllowPossibleSTCCompilationProblems
       
    74 		WarnAboutPossibleSTCCompilationProblems'
       
    75 	poolDictionaries:''
    77 	poolDictionaries:''
    76 	category:'System-Compiler'
    78 	category:'System-Compiler'
    77 !
    79 !
    78 
    80 
    79 !ParserFlags class methodsFor:'documentation'!
    81 !ParserFlags class methodsFor:'documentation'!
   419 
   421 
   420     "
   422     "
   421      self allowDolphinExtensions:true
   423      self allowDolphinExtensions:true
   422      self allowDolphinExtensions:false
   424      self allowDolphinExtensions:false
   423     "
   425     "
       
   426 !
       
   427 
       
   428 allowEmptyStatements
       
   429     "return true, if empty statements are allowed (two .'s in a row).
       
   430      Notice, that stc cannot (yet) handle those."
       
   431 
       
   432     ^ AllowEmptyStatements
       
   433 
       
   434     "Created: / 20-11-2006 / 14:29:02 / cg"
       
   435 !
       
   436 
       
   437 allowEmptyStatements:aBoolean
       
   438     "turn on/off, if empty statements are allowed (two .'s in a row).
       
   439      Notice, that stc cannot (yet) handle those."
       
   440 
       
   441     AllowEmptyStatements := aBoolean
       
   442 
       
   443     "Created: / 20-11-2006 / 14:29:15 / cg"
   424 !
   444 !
   425 
   445 
   426 allowExtendedSTXSyntax
   446 allowExtendedSTXSyntax
   427     "experimental syntay extensions"
   447     "experimental syntay extensions"
   428 
   448 
  1022     AllowNationalCharactersInIdentifier := false.
  1042     AllowNationalCharactersInIdentifier := false.
  1023     AllowHashAsBinarySelector := true.
  1043     AllowHashAsBinarySelector := true.
  1024     AllowSTXEOLComments := true.
  1044     AllowSTXEOLComments := true.
  1025     AllowVisualWorksMethodAnnotations := false.
  1045     AllowVisualWorksMethodAnnotations := false.
  1026     AllowPossibleSTCCompilationProblems := true.
  1046     AllowPossibleSTCCompilationProblems := true.
       
  1047     AllowEmptyStatements := false.
  1027 
  1048 
  1028     ArraysAreImmutable := false.                "/ no longer care for ST-80 compatibility
  1049     ArraysAreImmutable := false.                "/ no longer care for ST-80 compatibility
  1029     StringsAreImmutable := false.               "/ no longer care for ST-80 compatibility
  1050     StringsAreImmutable := false.               "/ no longer care for ST-80 compatibility
  1030     ImplicitSelfSends := false.
  1051     ImplicitSelfSends := false.
  1031 
  1052 
  1079     "
  1100     "
  1080      ParserFlags initialize
  1101      ParserFlags initialize
  1081     "
  1102     "
  1082 
  1103 
  1083     "Modified: / 09-08-2006 / 18:47:18 / fm"
  1104     "Modified: / 09-08-2006 / 18:47:18 / fm"
  1084     "Modified: / 16-11-2006 / 14:25:32 / cg"
  1105     "Modified: / 20-11-2006 / 14:27:45 / cg"
  1085 ! !
  1106 ! !
  1086 
  1107 
  1087 !ParserFlags methodsFor:'accessing-compilation control'!
  1108 !ParserFlags methodsFor:'accessing-compilation control'!
  1088 
  1109 
  1089 allowExtensionsToPrivateClasses
  1110 allowExtensionsToPrivateClasses
  1294     ^ allowDomainVariables
  1315     ^ allowDomainVariables
  1295 !
  1316 !
  1296 
  1317 
  1297 allowDomainVariables:aBoolean
  1318 allowDomainVariables:aBoolean
  1298     allowDomainVariables := aBoolean.
  1319     allowDomainVariables := aBoolean.
       
  1320 !
       
  1321 
       
  1322 allowEmptyStatements
       
  1323     ^ allowEmptyStatements ? false
       
  1324 
       
  1325     "Created: / 20-11-2006 / 13:56:14 / cg"
       
  1326 !
       
  1327 
       
  1328 allowEmptyStatements:aBoolean
       
  1329     allowEmptyStatements := aBoolean.
       
  1330 
       
  1331     "Created: / 20-11-2006 / 14:26:48 / cg"
  1299 !
  1332 !
  1300 
  1333 
  1301 allowExtendedBinarySelectors
  1334 allowExtendedBinarySelectors
  1302     ^ allowExtendedBinarySelectors
  1335     ^ allowExtendedBinarySelectors
  1303 !
  1336 !
  1704     allowNationalCharactersInIdentifier := AllowNationalCharactersInIdentifier.
  1737     allowNationalCharactersInIdentifier := AllowNationalCharactersInIdentifier.
  1705     allowHashAsBinarySelector := AllowHashAsBinarySelector.
  1738     allowHashAsBinarySelector := AllowHashAsBinarySelector.
  1706     allowSTXEOLComments := AllowSTXEOLComments.
  1739     allowSTXEOLComments := AllowSTXEOLComments.
  1707     allowVisualWorksMethodAnnotations := AllowVisualWorksMethodAnnotations.
  1740     allowVisualWorksMethodAnnotations := AllowVisualWorksMethodAnnotations.
  1708     allowPossibleSTCCompilationProblems := AllowPossibleSTCCompilationProblems.
  1741     allowPossibleSTCCompilationProblems := AllowPossibleSTCCompilationProblems.
       
  1742     allowEmptyStatements := AllowEmptyStatements.
  1709 
  1743 
  1710     arraysAreImmutable := ArraysAreImmutable ? true.
  1744     arraysAreImmutable := ArraysAreImmutable ? true.
  1711     stringsAreImmutable := StringsAreImmutable ? true.
  1745     stringsAreImmutable := StringsAreImmutable ? true.
  1712     implicitSelfSends := ImplicitSelfSends ? false.
  1746     implicitSelfSends := ImplicitSelfSends ? false.
  1713 
  1747 
  1730     "
  1764     "
  1731      ParserFlags initialize.
  1765      ParserFlags initialize.
  1732      self new inspect.
  1766      self new inspect.
  1733     "
  1767     "
  1734 
  1768 
  1735     "Modified: / 16-11-2006 / 14:25:42 / cg"
  1769     "Modified: / 20-11-2006 / 14:28:02 / cg"
  1736 ! !
  1770 ! !
  1737 
  1771 
  1738 !ParserFlags class methodsFor:'documentation'!
  1772 !ParserFlags class methodsFor:'documentation'!
  1739 
  1773 
  1740 version
  1774 version
  1741     ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.34 2006-11-16 13:44:02 cg Exp $'
  1775     ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.35 2006-11-20 13:30:08 cg Exp $'
  1742 ! !
  1776 ! !
  1743 
  1777 
  1744 ParserFlags initialize!
  1778 ParserFlags initialize!