Permalink
Browse files

Merge branch 'no-unreserve-property-accessors' of http://github.com/M…

  • Loading branch information...
2 parents c299c73 + 68d4dde commit e4b3916b56b6410aeab7215498acbe5043f9b064 @rstacruz rstacruz committed Oct 15, 2011
Showing with 11 additions and 3 deletions.
  1. +11 −3 lib/js2coffee.coffee
View
@@ -128,13 +128,19 @@ class Builder
# Any object identifier like a variable name.
'identifier': (n) ->
- unreserve n.value.toString()
+ if n.property_accessor
+ n.value.toString()
+ else
+ unreserve n.value.toString()
'number': (n) ->
"#{n.src()}"
'id': (n) ->
- unreserve n
+ if n.property_accessor
+ n
+ else
+ unreserve n
# `id_param`
# Function parameters. Belongs to `list`.
@@ -364,7 +370,9 @@ class Builder
# *If called as `x.prototype`, it should use double colons (`x::`).*
left = @build n.left()
- right = @build n.right()
+ right_obj = n.right()
+ right_obj.property_accessor = true
+ right = @build right_obj
if n.isThis and n.isPrototype
"@::"

0 comments on commit e4b3916

Please sign in to comment.