fixes #1385: property access on parenthesized number literals

This commit is contained in:
Michael Ficarra
2011-05-24 16:27:07 -04:00
parent 19520d8d35
commit c8845643e5
3 changed files with 7 additions and 3 deletions

View File

@@ -402,7 +402,7 @@ exports.Value = class Value extends Base
@base.front = @front
props = @properties
code = @base.compile o, if props.length then LEVEL_ACCESS else null
code = "(#{code})" if props[0] instanceof Access and @isSimpleNumber()
code = "#{code}." if (@base instanceof Parens or props.length) and SIMPLENUM.test code
code += prop.compile o for prop in props
code