コード例 #1
0
        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(";");
            }
        }
コード例 #2
0
 public static void Validate(this AST.Method x)
 {
     Validate((AST.ICallSignature)x);
 }