private void VisitGoto(goto_statement stmt) { if (extended_mode) AddHint("DO_NOT_USE_GOTO", stmt.location); }
public override void visit(SyntaxTree.goto_statement _goto_statement) { SymbolInfo si = context.CurrentScope.FindOnlyInScopeAndBlocks(_goto_statement.label.name); if (si == null) { AddError(new UndefinedNameReference(_goto_statement.label.name, get_location(_goto_statement.label))); } label_node lab = si.sym_info as label_node; if (lab == null) { AddError(get_location(_goto_statement.label), "IDENT_{0}_IS_NOT_LABEL", _goto_statement.label.name); } //if (lab.goto_blocked) //{ // throw new BlockedLabelGoto(_goto_statement.label.name, get_location(_goto_statement.label)); //} goto_statement gs = new goto_statement(lab, get_location(_goto_statement)); gs.comprehensive_code_block = context.block_stack.Peek(); lab.goto_statements.Add(gs); if (lab.comprehensive_code_block != null) { if (!context.check_can_goto(lab.comprehensive_code_block, gs.comprehensive_code_block)) { //AddError(gs.location, "BLOCKED_LABEL_{0}_GOTO", lab.name); } } ret.return_value((statement_node)gs); }
private void VisitGoto(goto_statement gs) { bw.Write(members[gs.label]); WriteDebugInfo(gs.location); }
private void VisitGoto(goto_statement stmt) { }