Skip to content

Commit

Permalink
修复表达式解析不带括号出现错误的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
youseries committed Aug 6, 2018
1 parent b56d442 commit 17f0673
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public Expression visitExpression(ExpressionContext ctx) {
expr.setExpression(parseItemContext(assignCtx.item()));
return expr;
}else if(returnCtx!=null){
return visitExpr(returnCtx.expr());
return parseExpr(returnCtx.expr());
}else{
throw new ReportParseException("Expression ["+ctx.getText()+"] is invalid.");
}
Expand Down Expand Up @@ -238,7 +238,7 @@ private ExpressionBlock parseBlock(BlockContext blockCtx){
}
if(returnCtx!=null){
if(block==null)block=new ExpressionBlock();
block.setReturnExpression(visitExpr(returnCtx.expr()));
block.setReturnExpression(parseExpr(returnCtx.expr()));
}
return block;
}
Expand Down

0 comments on commit 17f0673

Please sign in to comment.