Пример #1
0
        public PatternUst VisitComparisonExpression([NotNull] DslParser.ComparisonExpressionContext context)
        {
            PatternUst left      = VisitExpression(context.expression(0));
            PatternUst right     = VisitExpression(context.expression(1));
            var        opLiteral = new PatternBinaryOperatorLiteral(context.op.Text, context.op.GetTextSpan());
            var        result    = new PatternBinaryOperatorExpression(left, opLiteral, right, context.GetTextSpan());

            return(result);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public virtual T Visit(PatternBinaryOperatorExpression patternBinaryOperatorExpression)
 {
     return(VisitChildren(patternBinaryOperatorExpression));
 }