@Override public LimitClause visit(LimitClause limitClause, Void arg) throws CompilationException { Expression limitExpr = (Expression) limitClause.getLimitExpr().accept(this, arg); Expression offsetExpr = limitClause.hasOffset() ? (Expression) limitClause.getOffset().accept(this, arg) : null; LimitClause copy = new LimitClause(limitExpr, offsetExpr); copy.setSourceLocation(limitClause.getSourceLocation()); return copy; }
@Override public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(LimitClause lc, VariableSubstitutionEnvironment env) throws CompilationException { Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = lc.getLimitExpr().accept(this, env); Pair<ILangExpression, VariableSubstitutionEnvironment> p2; Expression lcOffsetExpr = lc.getOffset(); if (lcOffsetExpr != null) { p2 = lcOffsetExpr.accept(this, env); } else { p2 = new Pair<>(null, null); } LimitClause c = new LimitClause((Expression) p1.first, (Expression) p2.first); c.setSourceLocation(lc.getSourceLocation()); return new Pair<>(c, env); }
final public LimitClause LimitClause() throws ParseException, ParseException { LimitClause lc = new LimitClause(); Expression expr; pushForbiddenScope(getCurrentScope()); jj_consume_token(LIMIT); expr = Expression(); lc.setLimitExpr(expr); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OFFSET: jj_consume_token(OFFSET); expr = Expression(); lc.setOffset(expr); break; default: jj_la1[0] = jj_gen; ; } popForbiddenScope(); {if (true) return lc;} throw new Error("Missing return statement in function"); }
final public LimitClause LimitClause() throws ParseException, ParseException { LimitClause lc = new LimitClause(); Expression expr; pushForbiddenScope(getCurrentScope()); jj_consume_token(LIMIT); expr = Expression(); lc.setLimitExpr(expr); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OFFSET: jj_consume_token(OFFSET); expr = Expression(); lc.setOffset(expr); break; default: jj_la1[114] = jj_gen; ; } popForbiddenScope(); {if (true) return lc;} throw new Error("Missing return statement in function"); }
final public LimitClause LimitClause() throws ParseException, ParseException { Token startToken = null; LimitClause lc = new LimitClause(); Expression expr; pushForbiddenScope(getCurrentScope()); jj_consume_token(LIMIT); startToken = token; expr = Expression(); lc.setLimitExpr(expr); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OFFSET: jj_consume_token(OFFSET); expr = Expression(); lc.setOffset(expr); break; default: jj_la1[190] = jj_gen; ; } popForbiddenScope(); {if (true) return addSourceLocation(lc, startToken);} throw new Error("Missing return statement in function"); }