mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-14 17:27:59 -05:00
Added missing or to IndexNode.
This commit is contained in:
committed by
Jeremy Ashkenas
parent
ac05f62f2f
commit
52e6399e02
@@ -656,7 +656,7 @@
|
||||
__extends(IndexNode, BaseNode);
|
||||
IndexNode.prototype.compile_node = function compile_node(o) {
|
||||
var idx;
|
||||
o.chain_root.wrapped = this.soak_node;
|
||||
o.chain_root.wrapped = o.chain_root.wrapped || this.soak_node;
|
||||
idx = this.index.compile(o);
|
||||
return "[" + idx + "]";
|
||||
};
|
||||
|
||||
@@ -451,7 +451,7 @@ exports.AccessorNode: class AccessorNode extends BaseNode
|
||||
|
||||
constructor: (name, tag) ->
|
||||
@children: [@name: name]
|
||||
@prototype:tag is 'prototype'
|
||||
@prototype: tag is 'prototype'
|
||||
@soak_node: tag is 'soak'
|
||||
this
|
||||
|
||||
@@ -470,7 +470,7 @@ exports.IndexNode: class IndexNode extends BaseNode
|
||||
@soak_node: tag is 'soak'
|
||||
|
||||
compile_node: (o) ->
|
||||
o.chain_root.wrapped: @soak_node
|
||||
o.chain_root.wrapped: or @soak_node
|
||||
idx: @index.compile o
|
||||
"[$idx]"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user