use :node;

var Node = module.require('../Node').Node;

fn DoWhileStatement(test, body)

extends Node {

this.type = 'DoWhileStatement';

this.test = test;
this.test.parent = this;

this.body = body;
this.body.parent = this;

}

DoWhileStatement.prototype.codegen = () -> {

if !super.codegen() {
  return;
}

this.test = this.test.codegen();
this.body = this.body.blockWrap().codegen();

return this;

};

exports.DoWhileStatement = DoWhileStatement;