ads to_s to ast for better readability

This commit is contained in:
Torsten Ruger
2014-05-13 10:49:26 +03:00
parent 140d33b167
commit dd05b30230
4 changed files with 19 additions and 3 deletions

View File

@ -13,7 +13,11 @@ module Ast
block.collect{|m| m.inspect }.join( ",") +"] )"
end
def to_s
"def #{name}( " + params.join(",") + ") \n" + block.join("\n") + "end\n"
end
def compile context
raise self.to_s
parent_locals = context.locals
context.locals = {}
args = []