public override void EnterCond_stmt([NotNull] GrammarParser.Cond_stmtContext context) { ScopeNode LocalScope = new ScopeNode(); Scopes.Add(LocalScope); LocalScope.Parent = currentScope; currentScope = LocalScope; base.EnterCond_stmt(context); }
/// <summary> /// Exit a parse tree produced by <see cref="GrammarParser.cond_stmt"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitCond_stmt([NotNull] GrammarParser.Cond_stmtContext context) { }
public override void ExitCond_stmt([NotNull] GrammarParser.Cond_stmtContext context) { currentScope = currentScope.Parent; base.ExitCond_stmt(context); }
/// <summary> /// Visit a parse tree produced by <see cref="GrammarParser.cond_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 VisitCond_stmt([NotNull] GrammarParser.Cond_stmtContext context) { return(VisitChildren(context)); }
public override bool VisitCond_stmt([NotNull] GrammarParser.Cond_stmtContext context) { Console.WriteLine("Conditional statement"); return(base.VisitCond_stmt(context)); }