Skip to content

Commit 902fd00

Browse files
authored
[CBuilder] functions: emit declaration before definition (#112)
closes #1, i.e. recursice functions should be allowed now. however, this will not fix the general issue: if a function calls another function, this second function must still be declared before the first function ...
1 parent dfd40c9 commit 902fd00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/CBuilder/ProgramBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ public String buildProgram() {
139139
program.append('\n');
140140

141141
for (Function f : globalFunctions) {
142-
program.append(f.buildCFunction());
143142
program.append(f.buildFuncObjectDeclaration());
143+
program.append(f.buildCFunction());
144144
}
145145
program.append('\n');
146146

0 commit comments

Comments
 (0)