Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
0
 public virtual T Visit(PatternBinaryOperatorLiteral patternBinaryOperatorLiteral)
 {
     return(VisitChildren(patternBinaryOperatorLiteral));
 }