Skip to content

Commit 88f3cfd

Browse files
author
linzhijun
committed
修改
1 parent 822bbf8 commit 88f3cfd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

csharp/ToolGood.Algorithm2/Internals/MathSplitVisitor.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sealed class MathSplitVisitor : AbstractParseTreeVisitor<ConditionTree>, ImathVi
99
{
1010
public ConditionTree VisitProg(mathParser.ProgContext context)
1111
{
12-
return Visit(context.expr());
12+
return context.expr().Accept(this);
1313
}
1414
public ConditionTree VisitAndOr_fun(mathParser.AndOr_funContext context)
1515
{
@@ -21,13 +21,15 @@ public ConditionTree VisitAndOr_fun(mathParser.AndOr_funContext context)
2121
} else {
2222
tree.Type = ConditionTreeType.Or;
2323
}
24-
tree.Nodes.Add(this.Visit(context.expr(0)));
25-
tree.Nodes.Add(this.Visit(context.expr(1)));
24+
var exprs= context.expr();
25+
26+
tree.Nodes.Add(exprs[0].Accept(this));
27+
tree.Nodes.Add(exprs[1].Accept(this));
2628
return tree;
2729
}
2830
public ConditionTree VisitBracket_fun(mathParser.Bracket_funContext context)
2931
{
30-
return Visit(context.expr());
32+
return context.expr().Accept(this);
3133
}
3234
public ConditionTree Visit_fun(ParserRuleContext context)
3335
{

0 commit comments

Comments
 (0)