mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
after correctly recording objectnode's children, bin/node_coffee --tree is working pretty nicely
This commit is contained in:
@@ -550,7 +550,7 @@
|
|||||||
ObjectNode = (exports.ObjectNode = inherit(Node, {
|
ObjectNode = (exports.ObjectNode = inherit(Node, {
|
||||||
type: 'Object',
|
type: 'Object',
|
||||||
constructor: function constructor(props) {
|
constructor: function constructor(props) {
|
||||||
this.objects = (this.properties = props || []);
|
this.children = (this.objects = (this.properties = props || []));
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
// All the mucking about with commas is to make sure that CommentNodes and
|
// All the mucking about with commas is to make sure that CommentNodes and
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ ObjectNode: exports.ObjectNode: inherit Node, {
|
|||||||
type: 'Object'
|
type: 'Object'
|
||||||
|
|
||||||
constructor: (props) ->
|
constructor: (props) ->
|
||||||
@objects: @properties: props or []
|
@children: @objects: @properties: props or []
|
||||||
this
|
this
|
||||||
|
|
||||||
# All the mucking about with commas is to make sure that CommentNodes and
|
# All the mucking about with commas is to make sure that CommentNodes and
|
||||||
|
|||||||
Reference in New Issue
Block a user