unite the two resolve_to_index functions

This commit is contained in:
Torsten Ruger
2018-04-05 20:10:00 +03:00
parent f4ce6d6253
commit f09086e524
11 changed files with 105 additions and 46 deletions

View File

@ -1,9 +1,7 @@
require_relative '../helper'
module Risc
module Statements
include AST::Sexp
include CleanCompile
def setup
@ -62,7 +60,7 @@ module Risc
postamble.each {all.pop}
str = all.collect{|i| i.class.name}.join(", ").gsub("Risc::","")
str = "[#{str}]"
all = str.split(",").each_slice(5).collect { |line| " " + line.join(",")}
all = str.split(",").each_slice(5).collect { |line| " " + line.join(",")}
all.join(",\n")
end
end