示例#1
0
 public override void ExitAnd_op(lisp_gammarParser.And_opContext context)
 {
     if (!_FuncExp)
     {
         if (!_IfExp)
         {
             bool ans = true;
             for (int i = 2; i < context.ChildCount - 1; i++)
             {
                 if (context.children[i].GetText()[0] == '#')
                 {
                     ans &= (context.children[i].GetText() == "#t");
                 }
                 else
                 {
                     ParsingMessage.ErrorCode(4, context);
                 }
             }
             ClearCtx(context);
             AddCtx(context, ans ? "#t" : "#f");
         }
     }
     base.ExitAnd_op(context);
 }
 /// <summary>
 /// Exit a parse tree produced by <see cref="lisp_gammarParser.and_op"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitAnd_op([NotNull] lisp_gammarParser.And_opContext context)
 {
 }
示例#3
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="lisp_gammarParser.and_op"/>.
 /// <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 VisitAnd_op([NotNull] lisp_gammarParser.And_opContext context)
 {
     return(VisitChildren(context));
 }