Class SymbolChecker
java.lang.Object
org.ek9lang.compiler.support.SymbolChecker
General utility class that searches in a scope for a symbol to check for duplicates.
Note that is a bit ore than a boolean check. It will formulate error messages and add
then to the error listener it has been provided with.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanerrorsIfNameDiffersOnlyByCase(List<ISymbol> alreadyDefined, ISymbol symbol) Check whether the symbol being defined differs ONLY by case from one already defined in the same module.booleanerrorsIfNameIsBuiltIn(IScope moduleScope, ISymbol symbol) Check the symbol about to be defined in a user module does not take the name of a built-in construct (E01090).booleanerrorsIfSymbolAlreadyDefined(IScope inScope, ISymbol symbol, boolean limitVarSearchToBlockScope) Check for exising symbol in the scope.
-
Constructor Details
-
SymbolChecker
-
-
Method Details
-
errorsIfNameDiffersOnlyByCase
Check whether the symbol being defined differs ONLY by case from one already defined in the same module. Exact duplicates are reported byerrorsIfSymbolAlreadyDefined(IScope, ISymbol, boolean); this is the 'too similar' companion check. If this returns true then errors will have been added to the error listener. -
errorsIfNameIsBuiltIn
-
errorsIfSymbolAlreadyDefined
-