public class ExprParser extends StmtParser
Modifier and Type | Field and Description |
---|---|
static EnumSet<LeolaTokenType> |
EXPR_END_SET |
static EnumSet<LeolaTokenType> |
EXPR_START_SET |
STMT_FOLLOW_SET, STMT_START_SET
Constructor and Description |
---|
ExprParser(LeolaParser parser) |
ExprParser(LeolaParser parser,
boolean isNamedParameter) |
Modifier and Type | Method and Description |
---|---|
ASTNode |
parse(Token token)
Parse an expression.
|
protected ASTNode |
parseChainedExpr(Token token)
Parse an identifier.
|
Expr |
parseExpr(Token currToken)
Parses the next
Expr |
protected ASTNode |
parseIdentifier(Token token)
Parse an identifier.
|
eatOptionalStmtEnd, expectedTokens, parseList, parseStmt
expectToken, expectTokenNext, getErrorCount, parse, setLineNumber, throwParseError
currentToken, getEventDispatcher, getExceptionHandler, getScanner, getSource, nextToken, previousToken
public static final EnumSet<LeolaTokenType> EXPR_START_SET
public static final EnumSet<LeolaTokenType> EXPR_END_SET
public ExprParser(LeolaParser parser)
parser
- public ExprParser(LeolaParser parser, boolean isNamedParameter)
parser
- isNamedParameter
- public ASTNode parse(Token token) throws Exception
parse
in class StmtParser
token
- the initial token.Exception
- if an error occurred.protected ASTNode parseIdentifier(Token token) throws Exception
token
- the current token.Exception
- if an error occurred.Copyright © 2010–2015. All rights reserved.