Fix lambdas, ready for codegen

This commit is contained in:
2026-02-28 16:38:05 +11:00
parent 92045c6bb9
commit e74c2ccd3e
2 changed files with 17 additions and 4 deletions

View File

@@ -22,7 +22,11 @@ char* createCodegenError(SolsNode* node, char* what) {
APPEND_ESTR(err, line_buf);
APPEND_ESTR(err, "\n\n");
APPEND_ESTR(err, node->line.content);
if (node->line.content == NULL) {
APPEND_ESTR(err, "(null line)");
} else {
APPEND_ESTR(err, node->line.content);
}
APPEND_ESTR(err, "\n");
return err.str;
@@ -200,6 +204,9 @@ ResultType(SolsType, charptr) getNodeType(SolsNode* node, SolsScope* scope) {
}
return Success(SolsType, charptr, var->typeinfo);
}
case SNT_LAMBDA: {
return Success(SolsType, charptr, node->as.type);
}
}
return Error(SolsType, charptr, "Not yet implemented");
}