Sha256: bf1a27f6733c2e768d6b35978f19180516eee5e42bc8a62f3759b26de6702608
Contents?: true
Size: 689 Bytes
Versions: 3
Compression:
Stored size: 689 Bytes
Contents
use :node; var Node = module.require('../Node').Node; fn IfStatement(test, consequent, alternate) extends Node { this.type = 'IfStatement'; this.test = test; this.test.parent = this; this.consequent = consequent; this.consequent.parent = this; this.alternate = alternate; if this.alternate? { this.alternate.parent = this; } } IfStatement.prototype.codegen = () -> { if !super.codegen() { return; } this.test = this.test.codegen(); this.consequent = this.consequent.blockWrap().codegen(); if this.alternate? { this.alternate = this.alternate.blockWrap().codegen(); } return this; }; exports.IfStatement = IfStatement;
Version data entries
3 entries across 3 versions & 1 rubygems