allowing Klass::['dynamic-property'] syntax. Issue #392

This commit is contained in:
Jeremy Ashkenas
2010-05-31 22:32:43 -04:00
parent b8a4adbdc7
commit 45f442bd73
10 changed files with 178 additions and 167 deletions

View File

@@ -509,14 +509,14 @@ exports.IndexNode: class IndexNode extends BaseNode
type: 'IndexNode'
children: ['index']
constructor: (index, tag) ->
@index: index
@soak_node: tag is 'soak'
constructor: (index) ->
@index: index
compile_node: (o) ->
o.chain_root.wrapped: or @soak_node
idx: @index.compile o
"[$idx]"
prefix: if @proto then '.prototype' else ''
"$prefix[$idx]"
#### RangeNode