| 662 | return stmt; |
| 663 | } |
| 664 | virtual RefPtr<StatementSyntaxNode> VisitWhileStatement(WhileStatementSyntaxNode* stmt) override |
| 665 | { |
| 666 | RefPtr<WhileInstruction> instr = new WhileInstruction(); |
| 667 | variables.PushScope(); |
| 668 | codeWriter.PushNode(); |
| 669 | stmt->Predicate->Accept(this); |
| 670 | codeWriter.Insert(new ReturnInstruction(PopStack())); |
| 671 | instr->ConditionCode = codeWriter.PopNode(); |
| 672 | codeWriter.PushNode(); |
| 673 | stmt->Statement->Accept(this); |
| 674 | instr->BodyCode = codeWriter.PopNode(); |
| 675 | codeWriter.Insert(instr.Release()); |
| 676 | variables.PopScope(); |
| 677 | return stmt; |
| 678 | } |
| 679 | virtual RefPtr<StatementSyntaxNode> VisitDoWhileStatement(DoWhileStatementSyntaxNode* stmt) override |
| 680 | { |
| 681 | RefPtr<DoInstruction> instr = new DoInstruction(); |