Shorten the array syntax

This commit is contained in:
2025-05-30 12:57:04 +02:00
parent bd41736697
commit 3ece536414
4 changed files with 547 additions and 545 deletions

View File

@ -111,9 +111,12 @@ task :backport do
.gsub(/^from ([[:alnum:]]+) import/, 'FROM \1 IMPORT')
.gsub(/ \^([[:alnum:]])/, ' POINTER TO \1')
.gsub(/(then|do)$/) { |match| match.upcase }
.gsub(/(:|=) \[([[:digit:]]+)\]/, '\1 ARRAY[1..\2] OF ')
.each_line do |line|
if line.start_with? 'PROCEDURE'
current_procedure = line[10...line.index('(')]
line.gsub! ',', ';'
elsif line.start_with?('END;') && !current_procedure.nil?
line = "END #{current_procedure};"
current_proceure = nil