Transpile procedure declaration heading

This commit is contained in:
2025-05-28 00:13:04 +02:00
parent 46d89122e4
commit 24651e7c48
3 changed files with 66 additions and 6 deletions

View File

@ -102,9 +102,11 @@ task :backport do
target = source
.gsub(/^(var|type|const)/) { |match| match.upcase }
.gsub(/^[[:alnum:]]* ?module/) { |match| match.upcase }
.gsub(/(procedure|record| pointer to )/) { |match| match.upcase }
.gsub(/(record| pointer to )/) { |match| match.upcase }
.gsub(/proc(\(| )/, 'PROCEDURE\1')
.gsub(/([[:space:]]*)end;/, '\1END;')
.gsub(/^from ([[:alnum:]]+) import/, 'FROM \1 IMPORT')
.gsub(/ \^([[:alnum:]])/, ' POINTER TO \1')
target_path = Pathname.new('boot/stage1/source') + source_path.basename
File.write target_path, target