Esempio n. 1
0
        public PatternUst VisitMemberReferenceOrLiteralExpression(DslParser.MemberReferenceOrLiteralExpressionContext context)
        {
            var textSpan = context.GetTextSpan();
            var values   = new PatternUst[]
            {
                new PatternMemberReferenceExpression((PatternUst)VisitExpression(context.expression()),
                                                     VisitLiteralOrPatternId(context.literalOrPatternId()), textSpan),
                VisitLiteralOrPatternId(context.literalOrPatternId())
            };
            var result = new PatternOr(values, context.GetTextSpan());

            return(result);
        }
Esempio n. 2
0
        public UstNode VisitMemberReferenceOrLiteralExpression(DslParser.MemberReferenceOrLiteralExpressionContext context)
        {
            var textSpan = context.GetTextSpan();
            var values   = new Expression[]
            {
                new MemberReferenceExpression((Expression)VisitExpression(context.expression()), (Expression)VisitLiteralOrPatternId(context.literalOrPatternId()), textSpan, null),
                (Expression)VisitLiteralOrPatternId(context.literalOrPatternId())
            };
            var result = new PatternVarDef(GetNewVarDefName(), values, context.GetTextSpan());

            return(result);
        }