Shorten the array syntax
This commit is contained in:
3
Rakefile
3
Rakefile
@ -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
|
||||
|
Reference in New Issue
Block a user