default:
throw ASTWalkException.from("Encountered unexpected constant type " + terminal.getSymbol().getType(), terminal.getSymbol());
}
}
else {
RuleNode ruleNode = (RuleNode) node;
int ruleIndex = ruleNode.getRuleContext().getRuleIndex();
if (ruleIndex == EsperEPL2GrammarParser.RULE_number) {
return parseNumber(ruleNode, 1);
}
else if (ruleIndex == EsperEPL2GrammarParser.RULE_numberconstant) {
RuleNode number = findChildRuleByType(ruleNode, EsperEPL2GrammarParser.RULE_number);
if (ruleNode.getChildCount() > 1) {
if (ASTUtil.isTerminatedOfType(ruleNode.getChild(0), EsperEPL2GrammarLexer.MINUS)) {
return parseNumber(number, -1);
}
return parseNumber(number, 1);