summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-09-29 16:55:38 +0200
committerEugen Wissner <belka@caraus.de>2025-09-29 16:55:38 +0200
commit2519b3f9e999fc0f97c61c8f2a26d6c3e4f5f92c (patch)
treefec4f0563bba0b8dea44bccede1ad025f370346b /Rakefile
parent8ccb63530238f90e1d6611a6e1132d12c40962fe (diff)
downloadelna-2519b3f9e999fc0f97c61c8f2a26d6c3e4f5f92c.tar.gz
Switch completely to the table based lexer
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index a772900..9d866ea 100644
--- a/Rakefile
+++ b/Rakefile
@@ -41,10 +41,17 @@ end
desc 'Convert previous stage language into the current stage language'
task :convert do
- File.open('boot/stage10.elna', 'w') do |current_stage|
- File.readlines('boot/stage9.elna').each do |line|
- current_stage << line
+ File.open('boot/stage14.elna', 'w') do |current_stage|
+ previous_line = nil
+
+ File.readlines('boot/stage13.elna').each do |line|
+ if !previous_line.nil? && previous_line.start_with?('begin') && line.strip.start_with?('return')
+ else
+ current_stage << previous_line unless previous_line.nil?
+ end
+ previous_line = line
end
+ current_stage << previous_line
end
end