start to add while loop

This commit is contained in:
Torsten Ruger
2014-05-10 19:02:51 +03:00
parent e600911fe8
commit 47f1608685
9 changed files with 89 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
module Ast
class WhileExpression < Expression
attr_reader :condition, :body
def initialize condition, body
@condition , @body = condition , body
end
def inspect
self.class.name + ".new(" + condition.inspect + ", " + body.inspect + " )"
end
def attributes
[:condition, :body]
end
end
end