From 8147ef554a5f2715a60d8a0d9c08736f04792ea1 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sat, 13 Feb 2010 09:46:07 -0500 Subject: [PATCH] after correctly recording objectnode's children, bin/node_coffee --tree is working pretty nicely --- lib/coffee_script/nodes.js | 2 +- src/nodes.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/coffee_script/nodes.js b/lib/coffee_script/nodes.js index 37c6956f..509b82e8 100644 --- a/lib/coffee_script/nodes.js +++ b/lib/coffee_script/nodes.js @@ -550,7 +550,7 @@ ObjectNode = (exports.ObjectNode = inherit(Node, { type: 'Object', constructor: function constructor(props) { - this.objects = (this.properties = props || []); + this.children = (this.objects = (this.properties = props || [])); return this; }, // All the mucking about with commas is to make sure that CommentNodes and diff --git a/src/nodes.coffee b/src/nodes.coffee index 6b9435bf..f5ac353a 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -474,7 +474,7 @@ ObjectNode: exports.ObjectNode: inherit Node, { type: 'Object' constructor: (props) -> - @objects: @properties: props or [] + @children: @objects: @properties: props or [] this # All the mucking about with commas is to make sure that CommentNodes and