allowing quoted strings within object assignment, a in JS and JSON

This commit is contained in:
Jeremy Ashkenas
2009-12-24 17:14:53 -08:00
parent 65e9ba4c30
commit 95bfb0b45c
3 changed files with 3 additions and 2 deletions

View File

@@ -121,6 +121,7 @@ rule
# Assignment within an object literal.
AssignObj:
IDENTIFIER ":" Expression { result = AssignNode.new(val[0], val[2], :object) }
| STRING ":" Expression { result = AssignNode.new(val[0], val[2], :object) }
| Comment { result = val[0] }
;