Rename RTL symbol to data

This commit is contained in:
2026-04-11 23:02:41 +02:00
parent 2e27f78cff
commit a54285c71c
2 changed files with 57 additions and 38 deletions

View File

@@ -36,22 +36,25 @@ end
desc 'Convert previous stage language into the current stage language'
task :convert do
File.open('boot/stage21/cl.elna', 'w') do |current_stage|
File.readlines('boot/stage20/cl.elna').each do |line|
File.open('boot/stage22/cl.elna', 'w') do |current_stage|
seen_proc = false
File.readlines('boot/stage21/cl.elna').each do |line|
seen_proc = true if line.start_with? 'proc'
seen_proc = false if line.start_with? 'end'
if line.start_with?('begin') && !seen_proc
current_stage << <<~FUN
proc f();
var
x: ElnaLocation;
y: ElnaLocation;
begin
x := y;
end;
FUN
end
current_stage << line
end
# current_stage << <<~FUN
#
# proc f(m: ElnaInstructionModule);
# begin
# end;
#
# proc g();
# var
# x: ElnaInstructionModule;
# begin
# f(x)
# end;
# FUN
end
end