Package org.apache.commons.jexl3.parser
Interface JexlParser.LexicalUnit
- All Known Implementing Classes:
ASTBlock
,ASTForeachStatement
,ASTJexlLambda
,ASTJexlScript
,JexlLexicalNode
- Enclosing class:
- JexlParser
public static interface JexlParser.LexicalUnit
A lexical unit is the container defining local symbols and their
visibility boundaries.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
declareSymbol
(int symbol) Declares a local symbol.int
boolean
hasSymbol
(int symbol) Checks whether a symbol is declared in this lexical unit.boolean
isConstant
(int symbol) void
setConstant
(int symbol)
-
Method Details
-
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
-
setConstant
void setConstant(int symbol) -
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) -
getSymbolCount
int getSymbolCount()- Returns:
- the number of local variables declared in this unit
-
getLexicalScope
LexicalScope getLexicalScope()- Returns:
- the set of symbols identifiers declared in this unit
-