Пример #1
0
        public PatternUst VisitPatternNotLiteral([NotNull] DslParser.PatternNotLiteralContext context)
        {
            PatternUst patternLiteral = VisitPatternLiteral(context.patternLiteral());
            PatternUst result;

            if (context.PatternNot() != null)
            {
                result = new PatternNot(patternLiteral, context.GetTextSpan());
            }
            else
            {
                result = patternLiteral;
            }
            return(result);
        }
Пример #2
0
        public UstNode VisitPatternNotLiteral([NotNull] DslParser.PatternNotLiteralContext context)
        {
            Token      patternLiteral = (Token)VisitPatternLiteral(context.patternLiteral());
            Expression result;

            if (context.PatternNot() != null)
            {
                result = new PatternExpression(patternLiteral, true)
                {
                    TextSpan = context.GetTextSpan()
                };
            }
            else
            {
                result = patternLiteral;
            }
            return(result);
        }