still trying that while loop. Check as everything else works

This commit is contained in:
Torsten Ruger
2014-05-12 12:14:04 +03:00
parent 4a27314533
commit 7940efc64d
7 changed files with 56 additions and 38 deletions

View File

@@ -24,7 +24,8 @@ module Parser
Ast::ConditionalExpression.new(conditional, if_true, if_false)
end
rule(:while => simple(:while), :while_cond => simple(:while_cond) , :do => simple(:do),
rule(:while => simple(:while),
:while_cond => { :expressions => sequence(:while_cond) , :do => simple(:do)} ,
:body => {:expressions => sequence(:body) , :end => simple(:e) }) do
Ast::WhileExpression.new(while_cond, body)
end