mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
enhancement for #1380 fix
This commit is contained in:
parent
e4f47a05f6
commit
042f7ec791
1 changed files with 2 additions and 1 deletions
|
@ -598,7 +598,7 @@ exports.Access = class Access extends Base
|
|||
|
||||
compile: (o) ->
|
||||
name = @name.compile o
|
||||
@proto + if IS_STRING.test name then "[#{name}]" else ".#{name}"
|
||||
@proto + if IDENTIFIER.test name then ".#{name}" else "[#{name}]"
|
||||
|
||||
isComplex: NO
|
||||
|
||||
|
@ -932,6 +932,7 @@ exports.Assign = class Assign extends Base
|
|||
o.scope.add name, 'var'
|
||||
else
|
||||
o.scope.find name
|
||||
console.log @variable.constructor.name, name
|
||||
if @value instanceof Code and match = METHOD_DEF.exec name
|
||||
@value.klass = match[1] if match[1]
|
||||
@value.name = match[2] ? match[3] ? match[4]
|
||||
|
|
Loading…
Reference in a new issue