while code

This commit is contained in:
Torsten Ruger 2015-11-04 16:13:08 +02:00
parent f7981dcce5
commit 7a86f60c2d

View File

@ -57,6 +57,14 @@ class HtmlConverter < AST::Processor
end
div(s,str)
end
def on_while_statement statement
branch_type , condition , statements = *statement
condition = condition.first
ret = "while_#{branch_type}(" + process(condition) + ")<br>"
ret += process(statements)
ret += "end"
div(statement,ret)
end
def on_if_statement statement
branch_type , condition , if_true , if_false = *statement
condition = condition.first