public void GenerateMethodDeclaration(AST.Object type, AST.Method method) { bool isOverride = type.IsMethodOverride(method); if (method.IsAbstract || (method.IsVirtual && !isOverride)) { Code("virtual "); } Code("{0} {1}({2})", VariableType(method.Return), method.Name, DeclParameters(true, method.Parameters)); if (method.IsConst) { Code(" const"); } if (isOverride) { Line(" override;"); } else if (method.IsAbstract) { Line(" = 0;"); } else { Line(";"); } }
public static void Validate(this AST.Method x) { Validate((AST.ICallSignature)x); }