Beispiel #1
0
        public override object VisitExeCommandQuerySelect([NotNull] OALParser.ExeCommandQuerySelectContext context)
        {
            String     Cardinality  = context.GetChild(0).GetText().Contains("many") ? "many" : "any";
            String     VariableName = context.GetChild(1).GetText();
            String     ClassName    = context.GetChild(3).GetText();
            EXEASTNode WhereExpression;

            if (context.GetChild(4).GetText().Contains("where"))
            {
                //Console.WriteLine("where");
                Visit(context.GetChild(5));
                //Console.WriteLine("pocet v zasobniku: " + stackEXEASTNode.Count);

                WhereExpression = stackEXEASTNode.Peek();
                stackEXEScope.Peek().AddCommand(new EXECommandQuerySelect(Cardinality, ClassName, VariableName, WhereExpression));
            }
            else
            {
                stackEXEScope.Peek().AddCommand(new EXECommandQuerySelect(Cardinality, ClassName, VariableName));
            }

            //Console.WriteLine("ending execommandqueryselect");
            stackEXEASTNode.Clear();

            return(null);
            //return base.VisitExeCommandQuerySelect(context);
        }
Beispiel #2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="OALParser.exeCommandQuerySelect"/>.
 /// <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 VisitExeCommandQuerySelect([NotNull] OALParser.ExeCommandQuerySelectContext context)
 {
     return(VisitChildren(context));
 }
Beispiel #3
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="OALParser.exeCommandQuerySelect"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitExeCommandQuerySelect([NotNull] OALParser.ExeCommandQuerySelectContext context)
 {
 }