add to_s for statements

This commit is contained in:
Torsten Ruger
2018-07-03 22:18:19 +03:00
parent e099014d63
commit 2ad24ab0bb
11 changed files with 51 additions and 0 deletions

View File

@ -35,6 +35,11 @@ module Vool
Parfait::NamedList.type_for( type_hash )
end
def to_s(depth = 0)
arg_str = @args.collect{|a| a.to_s}.join(', ')
at_depth(depth , "def #{name}(#{arg_str})" , @body.to_s(depth + 1) , "end")
end
private
def make_frame