Let elna_tac_make_variable accept an ElnaTacOperand type

This commit is contained in:
2026-04-30 23:47:20 +02:00
parent 14d130f285
commit ebb2af7ae9
2 changed files with 93 additions and 53 deletions
+4 -3
View File
@@ -47,12 +47,14 @@ task :convert do
proc f();
var
x: ^ElnaLocation;
y: ElnaLocation;
begin
x := malloc(#size(ElnaLocation));
y.line := 1;
y.column := 3;
x := y;
printf("# %i %i %i %i\\n\\0", x.line, x.column, y.line, y.column)
x^ := y;
printf("# %i %i %i %i\\n\\0", x^.line, x^.column, y.line, y.column)
end;
begin
@@ -61,7 +63,6 @@ task :convert do
elsif line.start_with?('var') && !seen_global_var
current_stage << <<~FUN
var
x: ElnaLocation;
FUN
else
current_stage << line