public override void ExitForStatement([NotNull] PigeonParser.ForStatementContext context) { CheckExprType(context.expr(0), PigeonType.Int); CheckExprType(context.expr(1), PigeonType.Int); scope = scope.Parent; }
public override void EnterForStatement([NotNull] PigeonParser.ForStatementContext context) { scope = new Scope(scope); scope.DeclareVariable(PigeonType.Int, context.ID().GetText(), false); }