public UstNode VisitBinaryOperatorExpression(DslParser.BinaryOperatorExpressionContext context) { var left = (Expression)VisitExpression(context.expression(0)); var literal = new BinaryOperatorLiteral(context.op.Text, context.op.GetTextSpan(), null); var right = (Expression)VisitExpression(context.expression(1)); var textSpan = context.GetTextSpan(); var result = new BinaryOperatorExpression(left, literal, right, textSpan, null); return(result); }
public PatternUst VisitBinaryOperatorExpression(DslParser.BinaryOperatorExpressionContext context) { PatternUst left = VisitExpression(context.expression(0)); var literal = new PatternBinaryOperatorLiteral(context.op.Text, context.op.GetTextSpan()); PatternUst right = VisitExpression(context.expression(1)); var textSpan = context.GetTextSpan(); var result = new PatternBinaryOperatorExpression(left, literal, right, textSpan); return(result); }