1
0
Fork 0
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:
Michael Ficarra 2011-05-25 04:08:54 -04:00
parent e4f47a05f6
commit 042f7ec791

View file

@ -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]