public static void GenerateObjCMethodSignature(this CCodeGenerator gen, Method method) { gen.Write("{0}", method.IsStatic ? "+" : "-"); var retType = method.ReturnType.Visit(gen.CTypePrinter); gen.Write(" ({0}){1}", retType, method.Name); gen.Write(gen.CTypePrinter.VisitParameters(method.Parameters)); }
public override bool VisitMethodDecl(Method method) { PushBlock(BlockKind.Method, method); var @class = method.Namespace as Class; Write($"public {method.ReturnType} {CCodeGenerator.GetMethodIdentifier(method)}("); Write(TypePrinter.VisitParameters(method.Parameters, hasNames: true).ToString()); Write(");"); PopBlock(NewLineKind.Never); return(true); }
public static bool GenerateObjCField(this CCodeGenerator gen, Field field) { gen.WriteLine($"{GetObjCAccessKeyword(field.Access)} {field.Type} {field.Name};"); return(true); }