예제 #1
0
        public override BaseNode VisitFilterAtom(QueryFilteringParser.FilterAtomContext context)
        {
            var resultNode = context.boolExpr?.Accept(this) ??
                             context.filterExpr?.Accept(this) ??
                             throw new ParseRuleException(nameof(FilterExpressionVisitor));

            if (context.not != null)
            {
                resultNode = new NotNode(resultNode);
            }

            return(resultNode);
        }
 /// <summary>
 /// Visit a parse tree produced by <see cref="QueryFilteringParser.filterAtom"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitFilterAtom([NotNull] QueryFilteringParser.FilterAtomContext context)
 {
     return(VisitChildren(context));
 }