Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 public virtual T Visit(PatternBinaryOperatorExpression patternBinaryOperatorExpression)
 {
     return(VisitChildren(patternBinaryOperatorExpression));
 }