The CodeBuilder to use.
The name of the type that the function returns.
The name of the function.
The function's parameters.
The CodeFunc which generates the code for the function's body.
builder
auto builder = new CodeBuilder(); builder.addFuncDeclaration("int", "sum", [Variable("int", "a"), Variable("int", "b")], (b){b.addReturn("a + b"d);}); builder.data.should.equal("int sum(int a, int b)\n{\n\treturn a + b;\n}\n");
Creates a function using the given data.