コード例 #1
0
        public override GrammarResult VisitNegatedExpression(SearchGrammarParser.NegatedExpressionContext context)
        {
            var childExpression = base.Visit(context.children[context.ChildCount - 1]).Expression;
            var expression      = Expression.Not(childExpression);

            return(new GrammarResult(expression, this.terms));
        }
コード例 #2
0
        public override string VisitNegatedExpression(SearchGrammarParser.NegatedExpressionContext context)
        {
            this.stringBuilder.AppendLine(new string(' ', this.currentDepth) + "NegatedExpression" + "'");
            this.currentDepth += 2;

            var result = base.VisitNegatedExpression(context);

            this.currentDepth -= 2;

            return(result);
        }