diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-11-25 08:03:05 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-11-25 08:03:05 +0100 |
| commit | c20d9b7240033b462b33030ba4946135bc7d7fef (patch) | |
| tree | 1ef1f96a42999bebd8b9eb00d3480f776f591a04 /Rakefile | |
| parent | c3eff02f8d610b6bd259eee672c044731df43d65 (diff) | |
| download | elna-c20d9b7240033b462b33030ba4946135bc7d7fef.tar.gz | |
Set expression type for enumeration values
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 46 |
1 files changed, 11 insertions, 35 deletions
@@ -40,43 +40,19 @@ end desc 'Convert previous stage language into the current stage language' task :convert do - File.open('boot/stage16.elna', 'w') do |current_stage| - skip = false - - File.readlines('boot/stage15.elna').each do |line| - if line.strip == 'type' - current_stage << <<~SNIP - type - _elna_tac_declaration = record - next: Word; - name: Word; - length: Word; - body: Word - end; - _integer_literal_node = record - kind: Word; - value: Word; - length: Word - end; - SNIP - elsif line.start_with?('proc _elna_tac_declaration_size') - skip = true - elsif line.start_with?('proc _elna_tac_declaration_get_') - skip = true - elsif line.start_with?('proc _elna_tac_declaration_set_') - skip = true - elsif line.start_with?('proc _integer_literal_node_size') - skip = true - elsif line.start_with?('proc _integer_literal_node_get_') - skip = true - elsif line.start_with?('proc _integer_literal_node_set_') - skip = true - elsif line.start_with?('end') && skip - skip = false - elsif !skip + File.open('boot/stage17/cl.elna', 'w') do |current_stage| + File.readlines('boot/stage16/cl.elna').each do |line| current_stage << line - end end + current_stage << <<~STAGE + + proc f(x: ElnaTreeExpression); + var + y: Word; + begin + y := x.kind + end; + STAGE end end |
