soml-parser/lib/ast/while_expression.rb
2015-09-14 19:50:39 +03:00

18 lines
306 B
Ruby

module Ast
class WhileExpression < Expression
attr_reader :condition, :body
def initialize condition, body
@condition , @body = condition , body
end
def attributes
[:condition, :body]
end
def to_s
condition.inspect + ", " + body.inspect
end
end
end