Sha256: a5dcad7e11af0900b2fbf4dc2eadb0f119ad0aa187dcc065f58e5551519b8216
Contents?: true
Size: 841 Bytes
Versions: 3
Compression:
Stored size: 841 Bytes
Contents
use :node; var Node = module.require('../Node').Node; fn ObjectPattern(properties) extends Node { this.type = 'ObjectPattern'; this.properties = properties; for property in this.properties { property.parent = this; } } ObjectPattern.prototype.codegen = () -> { if !super.codegen() { return; } var context = this.getContext().node; for property, i in this.properties { this.properties[i] = property.codegen(); if property.value? { if property.value.type == "Identifier" { context.defineIdentifier(property.value); } } else { if property.key.type == "Identifier" { context.defineIdentifier(property.key); } } } return this; }; ObjectPattern.prototype.hasCallExpression = () -> true; exports.ObjectPattern = ObjectPattern;
Version data entries
3 entries across 3 versions & 1 rubygems