summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile20
1 files changed, 5 insertions, 15 deletions
diff --git a/Rakefile b/Rakefile
index c9a255f..6778780 100644
--- a/Rakefile
+++ b/Rakefile
@@ -36,28 +36,18 @@ end
desc 'Convert previous stage language into the current stage language'
task :convert do
- File.open('boot/stage23/cl.elna', 'w') do |current_stage|
+ File.open('boot/stage24/cl.elna', 'w') do |current_stage|
seen_proc = false
- File.readlines('boot/stage22/cl.elna').each do |line|
- if line.start_with? 'proc'
+ File.readlines('boot/stage23/cl.elna').each do |line|
+ if line.start_with?('proc') && !seen_proc
seen_proc = true
- current_stage << line
- elsif seen_proc && line.start_with?('begin')
- seen_proc = false
- current_stage << line
- elsif !seen_proc && line.start_with?('begin')
current_stage << <<~CODE
- proc f()
- begin
- \tprintf("# %.*s %p %i\\n\\0".ptr, "location".length, "location".ptr, "location".ptr, "location".length)
- end
+ proc sprintf(buffer: Pointer, format: ^Char, number: Word)
+ extern
CODE
current_stage << line
- current_stage << <<~CODE
- \tf();
- CODE
else
current_stage << line
end