Add placeholder for generated constructors.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/024c8154 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/024c8154 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/024c8154 Branch: refs/heads/master Commit: 024c8154c1cf39c098393eac65b47e21fde75ba2 Parents: 6090c31 Author: Marvin Humphrey <[email protected]> Authored: Sat Jul 11 16:01:41 2015 -0700 Committer: Marvin Humphrey <[email protected]> Committed: Mon Jul 20 13:40:36 2015 -0700 ---------------------------------------------------------------------- compiler/src/CFCGo.c | 12 +++++++++++- compiler/src/CFCGoClass.c | 5 +++++ compiler/src/CFCGoClass.h | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/024c8154/compiler/src/CFCGo.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCGo.c b/compiler/src/CFCGo.c index e571cc5..3b3af2e 100644 --- a/compiler/src/CFCGo.c +++ b/compiler/src/CFCGo.c @@ -232,6 +232,7 @@ S_gen_autogen_go(CFCGo *self, CFCParcel *parcel) { CFCGoClass **registry = CFCGoClass_registry(); char *type_decs = CFCUtil_strdup(""); char *boilerplate = CFCUtil_strdup(""); + char *ctors = CFCUtil_strdup(""); char *meth_defs = CFCUtil_strdup(""); for (int i = 0; registry[i] != NULL; i++) { @@ -250,6 +251,10 @@ S_gen_autogen_go(CFCGo *self, CFCParcel *parcel) { boilerplate = CFCUtil_cat(boilerplate, boiler_code, "\n", NULL); FREEMEM(boiler_code); + char *ctor_code = CFCGoClass_gen_ctors(class_binding); + ctors = CFCUtil_cat(ctors, ctor_code, "\n", NULL); + FREEMEM(ctor_code); + char *glue = CFCGoClass_gen_meth_glue(class_binding); meth_defs = CFCUtil_cat(meth_defs, glue, "\n", NULL); FREEMEM(glue); @@ -264,15 +269,20 @@ S_gen_autogen_go(CFCGo *self, CFCParcel *parcel) { "\n" "%s\n" "\n" + "// Constructors.\n" + "\n" + "%s\n" + "\n" "// Method bindings.\n" "\n" "%s\n" "\n" ; char *content - = CFCUtil_sprintf(pattern, type_decs, boilerplate, meth_defs); + = CFCUtil_sprintf(pattern, type_decs, boilerplate, ctors, meth_defs); FREEMEM(meth_defs); + FREEMEM(ctors); FREEMEM(boilerplate); FREEMEM(type_decs); return content; http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/024c8154/compiler/src/CFCGoClass.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCGoClass.c b/compiler/src/CFCGoClass.c index cffa762..28d00d8 100644 --- a/compiler/src/CFCGoClass.c +++ b/compiler/src/CFCGoClass.c @@ -259,6 +259,11 @@ CFCGoClass_boilerplate_funcs(CFCGoClass *self) { return content; } +char* +CFCGoClass_gen_ctors(CFCGoClass *self) { + return CFCUtil_strdup(""); +} + static void S_lazy_init_method_bindings(CFCGoClass *self) { if (self->method_bindings) { http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/024c8154/compiler/src/CFCGoClass.h ---------------------------------------------------------------------- diff --git a/compiler/src/CFCGoClass.h b/compiler/src/CFCGoClass.h index 2791179..bfe88ca 100644 --- a/compiler/src/CFCGoClass.h +++ b/compiler/src/CFCGoClass.h @@ -71,6 +71,9 @@ char* CFCGoClass_boilerplate_funcs(CFCGoClass *self); char* +CFCGoClass_gen_ctors(CFCGoClass *self); + +char* CFCGoClass_gen_meth_glue(CFCGoClass *self); void
