From a54285c71c58e7687237782dfd5c645714af5e4f Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 11 Apr 2026 23:02:41 +0200 Subject: Rename RTL symbol to data --- Rakefile | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index e59d474..f66b9eb 100644 --- a/Rakefile +++ b/Rakefile @@ -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 -- cgit v1.2.3