public override void ExitDef_stmt(lisp_gammarParser.Def_stmtContext context) { if (!_FuncExp) { if (!_IfExp) { var id = context.GetChild(2).GetText(); var val = context.GetChild(3).GetText(); DebugAction.Debug_WriteLine(val); _Symtable.Add(id, context.GetChild(3) as ParserRuleContext); } } base.ExitDef_stmt(context); }
/// <summary> /// Exit a parse tree produced by <see cref="lisp_gammarParser.def_stmt"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitDef_stmt([NotNull] lisp_gammarParser.Def_stmtContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="lisp_gammarParser.def_stmt"/>. /// <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 VisitDef_stmt([NotNull] lisp_gammarParser.Def_stmtContext context) { return(VisitChildren(context)); }