Sha256: 2b7a50018748afe5db3321584bdd6d9a44afb5fa9ed28335881472d1325cc209

Contents?: true

Size: 495 Bytes

Versions: 3

Compression:

Stored size: 495 Bytes

Contents

use :node;

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

fn CatchClause(param, body) 
  extends Node {
  
  this.type = 'CatchClause';
  
  this.param = param;
  this.param.parent = this;
  
  this.body = body;
  this.body.parent = this;
}

CatchClause.prototype.codegen = () -> {
  if !super.codegen() {
    return;
  }
  
  this.param = this.param.codegen(false);
  this.defineIdentifier(this.param);
  
  this.body = this.body.codegen();
  
  return this;
};

exports.CatchClause = CatchClause;

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spider-src-0.1.7 lib/spider-src/support/spider/src/ast/CatchClause.spider
spider-src-0.1.6 lib/spider-src/support/spider/src/ast/CatchClause.spider
spider-src-0.1.5 lib/spider-src/support/spider/src/ast/CatchClause.spider