public virtual void switch_statement(switch_statement ast) { ast.expr = expression(ast.expr); foreach (switch_section s in ast.sections) { switch_section(s); } }
virtual public void switch_statement(switch_statement ast, int indent) { // Write("switch (", indent); // visit(ast.expr); // WriteLine(") {{"); // foreach (switch_section s in ast.sections) { // foreach (switch_label l in s.labels) // switch_label(l, indent); // foreach (statement st in s.stmts) // visit(st, indent + 1); // } // WriteLine("}}", indent); }
virtual public void switch_statement(switch_statement ast, int indent) { Write("switch (", indent); visit(ast.expr); WriteLine(") {{"); foreach (switch_section s in ast.sections) { foreach (switch_label l in s.labels) { switch_label(l, indent); } foreach (statement st in s.stmts) { visit(st, indent + 1); } } WriteLine("}}", indent); }