fix: parser sets typeName for pointer types, simplify Lcx_LowerParam

This commit is contained in:
2026-05-31 21:18:16 +03:00
parent 646c1cad28
commit 9020f437d4
4 changed files with 28 additions and 8 deletions
+10
View File
@@ -109,6 +109,16 @@ func parserParseType(p: *Parser) -> *TypeExpr {
te.line = line;
te.column = col;
te.pointerPointee = parserParseType(p);
// Set typeName to "String*" for String pointer, else "int*"
if te.pointerPointee != null as *TypeExpr {
if String_Eq(te.pointerPointee.typeName, "String") {
te.typeName = "String*";
} else if String_Eq(te.pointerPointee.typeName, "int") {
te.typeName = "int*";
} else {
te.typeName = "int*";
}
}
return te;
}