Class ParseTreeSymbolLocator
java.lang.Object
org.ek9lang.compiler.ParseTreeSymbolLocator
- All Implemented Interfaces:
BiFunction<CompilableSource, IToken, Optional<ISymbol>>
final class ParseTreeSymbolLocator
extends Object
implements BiFunction<CompilableSource, IToken, Optional<ISymbol>>
Find the ISymbol at a given token position by traversing the parse tree.
Returns the recorded symbol for the deepest node matching the token.
This is designed to be a field within ParsedModule - constructed with the module reference.
-
Constructor Details
-
ParseTreeSymbolLocator
ParseTreeSymbolLocator(ParsedModule parsedModule)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceBiFunction<CompilableSource, IToken, Optional<ISymbol>>
-