Package org.apache.commons.jexl3.parser
Interface JexlParser.LexicalUnit
-
- All Known Implementing Classes:
ASTArrayAccess,ASTBlock,ASTForeachStatement,ASTJexlLambda,ASTJexlScript,ASTTryResources,ASTTryStatement,JexlLexicalNode
- Enclosing class:
- JexlParser
public static interface JexlParser.LexicalUnitA lexical unit is the container defining local symbols and their visibility boundaries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandeclareSymbol(int symbol)Declares a local symbol.LexicalScopegetLexicalScope()intgetSymbolCount()booleanhasSymbol(int symbol)Checks whether a symbol is declared in this lexical unit.booleanisConstant(int symbol)voidsetConstant(int symbol)
-
-
-
Method Detail
-
declareSymbol
boolean declareSymbol(int symbol)
Declares a local symbol.- Parameters:
symbol- the symbol index in the scope- Returns:
- true if declaration was successful, false if symbol was already declared
-
getLexicalScope
LexicalScope getLexicalScope()
- Returns:
- the set of symbols identifiers declared in this unit
-
getSymbolCount
int getSymbolCount()
- Returns:
- the number of local variables declared in this unit
-
hasSymbol
boolean hasSymbol(int symbol)
Checks whether a symbol is declared in this lexical unit.- Parameters:
symbol- the symbol- Returns:
- true if declared, false otherwise
-
isConstant
boolean isConstant(int symbol)
-
setConstant
void setConstant(int symbol)
-
-