core build system and array, it compiles!
This commit is contained in:
@@ -35,7 +35,7 @@ core_type_to_string(Ast_Type *type) {
|
||||
For(args) {
|
||||
String t = core_type_to_string(it);
|
||||
b->addf("%Q", t);
|
||||
if (!args.is_last(&it)) b->addf(", ");
|
||||
if (!args.is_last(it)) b->addf(", ");
|
||||
}
|
||||
b->addf(")");
|
||||
if (type->func.ret) {
|
||||
@@ -160,7 +160,7 @@ void core__stringify(Ast *ast) {
|
||||
gen("(");
|
||||
For(n->exprs) {
|
||||
core__stringify(it);
|
||||
if (!n->exprs.is_last(&it)) gen(",");
|
||||
if (!n->exprs.is_last(it)) gen(",");
|
||||
}
|
||||
gen(")");
|
||||
} break;
|
||||
@@ -228,7 +228,7 @@ void core__stringify(Ast *ast) {
|
||||
Ast_Var_Unpack *n = (Ast_Var_Unpack *)ast;
|
||||
For(n->vars) {
|
||||
core__stringify(it);
|
||||
if (!n->vars.is_last(&it)) gen(",");
|
||||
if (!n->vars.is_last(it)) gen(",");
|
||||
}
|
||||
gen(" = ");
|
||||
core__stringify(n->expr);
|
||||
@@ -328,7 +328,7 @@ void core__stringify(Ast *ast) {
|
||||
gen("return ");
|
||||
For(n->expr) {
|
||||
core__stringify(it);
|
||||
if (!n->expr.is_last(&it)) gen(", ");
|
||||
if (!n->expr.is_last(it)) gen(", ");
|
||||
}
|
||||
} break;
|
||||
|
||||
@@ -338,14 +338,14 @@ void core__stringify(Ast *ast) {
|
||||
gen("(");
|
||||
For(n->args) {
|
||||
core__stringify(it);
|
||||
if (!n->args.is_last(&it)) gen(", ");
|
||||
if (!n->args.is_last(it)) gen(", ");
|
||||
}
|
||||
gen(")");
|
||||
|
||||
if (n->ret.len) gen(": ");
|
||||
For(n->ret) {
|
||||
core__stringify(it);
|
||||
if (!n->ret.is_last(&it)) gen(", ");
|
||||
if (!n->ret.is_last(it)) gen(", ");
|
||||
}
|
||||
|
||||
core__stringify(n->scope);
|
||||
|
||||
Reference in New Issue
Block a user