This commit is contained in:
Jeremy Ashkenas
2010-03-10 21:53:33 -05:00
parent 3f9fd85afb
commit 0379431812
2 changed files with 9 additions and 6 deletions

View File

@@ -352,7 +352,7 @@ exports.CallNode: class CallNode extends BaseNode
"${meth}.call(this${ if args.length then ', ' else '' }$args)"
# If you call a function with a splat, it's converted into a JavaScript
# `.apply()` call to allow the variable-length arguments.
# `.apply()` call to allow an array of arguments to be passed.
compile_splat: (o) ->
meth: @variable.compile o
obj: @variable.source or 'this'
@@ -408,11 +408,12 @@ exports.AccessorNode: class AccessorNode extends BaseNode
this
compile_node: (o) ->
'.' + (if @prototype then 'prototype.' else '') + @name.compile(o)
proto_part: if @prototype then 'prototype.' else ''
".$proto_part${@name.compile(o)}"
#### IndexNode
# An indexed accessor into an array or object.
# A `[ ... ]` indexed accessor into an array or object.
exports.IndexNode: class IndexNode extends BaseNode
type: 'Index'