diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-06-19 12:29:18 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-06-19 12:29:18 +0200 |
| commit | 9515e2f77e8e26590e7ca00ef18a6637d4fb156a (patch) | |
| tree | c84cf679685a8918bcdf181fdc10a8faaf66bcb6 /Rakefile | |
| parent | b58f8a8c45a7a456b44f28ec33ffb113adba06ca (diff) | |
| download | elna-9515e2f77e8e26590e7ca00ef18a6637d4fb156a.tar.gz | |
Use buffered I/O
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 20 |
1 files changed, 5 insertions, 15 deletions
@@ -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 |
