rubyx/lib/vm/tree/while_statement.rb
2017-01-14 19:28:44 +02:00

12 lines
262 B
Ruby

module Vm
module Tree
class WhileStatement < Statement
attr_accessor :branch_type , :condition , :statements
def to_s
str = "while_#{branch_type}(#{condition}) do\n"
str + statements.to_s + "\nend\n"
end
end
end
end