Transpile procedures and statements
This commit is contained in:
8
Rakefile
8
Rakefile
@ -100,13 +100,15 @@ task :backport do
|
||||
source = File.read source_path
|
||||
|
||||
target = source
|
||||
.gsub(/^(var|type|const)/) { |match| match.upcase }
|
||||
.gsub(/^(var|type|const|begin)/) { |match| match.upcase }
|
||||
.gsub(/^[[:alnum:]]* ?module/) { |match| match.upcase }
|
||||
.gsub(/(record| pointer to )/) { |match| match.upcase }
|
||||
.gsub(/\brecord\b/) { |match| match.upcase }
|
||||
.gsub(/proc(\(| )/, 'PROCEDURE\1')
|
||||
.gsub(/([[:space:]]*)end;/, '\1END;')
|
||||
.gsub(/([[:space:]]*)end(;?)$/, '\1END\2')
|
||||
.gsub(/^([[:space:]]*)(while|return|if)\b/) { |match| match.upcase }
|
||||
.gsub(/^from ([[:alnum:]]+) import/, 'FROM \1 IMPORT')
|
||||
.gsub(/ \^([[:alnum:]])/, ' POINTER TO \1')
|
||||
.gsub(/(then|do)$/) { |match| match.upcase }
|
||||
|
||||
target_path = Pathname.new('boot/stage1/source') + source_path.basename
|
||||
File.write target_path, target
|
||||
|
Reference in New Issue
Block a user