virtual public void class_declaration(class_declaration ast, int indent) { EmitattributeSectionList(ast.attrs, indent); EmitModifiers(ast.mods, indent, " "); Write("class {0}", ast.id.str); if (ast.bases.Count > 0) { Write(": "); visit(ast.bases[(0)]); for (int i = 1; i < ast.bases.Count; i++) { Write(", "); visit(ast.bases[(i)]); } } WriteLine(" {{"); foreach (declaration d in ast.body) { if (IsPublic(d.mods)) { visit(d, indent + 1); } } WriteLine("}}", indent); }
void class_declaration(class_declaration ast, ArrayList list) { list.Add(new Pair(ast.id.str, ast)); list = new ArrayList(); foreach (declaration x in ast.body) { declaration(x, list); } ast.body = Sort(list); }
public virtual void class_declaration(class_declaration ast) { declarationList(ast.body); }