use of kalang.ast.IncrementExpr in project kalang by kasonyang.
the class AstBuilder method getIncrementExpr.
public IncrementExpr getIncrementExpr(ExpressionContext expressionContext, String op, boolean isPrefix) {
ExprNode expr = visitExpression(expressionContext);
if (!(expr instanceof AssignableExpr)) {
AstBuilder.this.handleSyntaxError("require assignable expression", expressionContext);
return null;
}
boolean isDesc = op.equals("--");
return new IncrementExpr((AssignableExpr) expr, isDesc, isPrefix);
}
Aggregations