Пример #1
0
 public override void ExitOr_op(lisp_gammarParser.Or_opContext context)
 {
     if (!_FuncExp)
     {
         if (!_IfExp)
         {
             bool ans = false;
             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.ExitOr_op(context);
 }
 /// <summary>
 /// Exit a parse tree produced by <see cref="lisp_gammarParser.or_op"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitOr_op([NotNull] lisp_gammarParser.Or_opContext context)
 {
 }
Пример #3
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="lisp_gammarParser.or_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 VisitOr_op([NotNull] lisp_gammarParser.Or_opContext context)
 {
     return(VisitChildren(context));
 }