mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
allowing quoted strings within object assignment, a in JS and JSON
This commit is contained in:
parent
65e9ba4c30
commit
95bfb0b45c
3 changed files with 3 additions and 2 deletions
|
@ -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] }
|
||||
;
|
||||
|
||||
|
|
2
test/fixtures/execution/test_everything.cs
vendored
2
test/fixtures/execution/test_everything.cs
vendored
|
@ -6,7 +6,7 @@ func: =>
|
|||
a--.
|
||||
|
||||
c: {
|
||||
text: b
|
||||
"text": b
|
||||
}
|
||||
|
||||
c: 'error' unless 42 > 41
|
||||
|
|
2
test/fixtures/execution/test_everything.js
vendored
2
test/fixtures/execution/test_everything.js
vendored
|
@ -7,7 +7,7 @@
|
|||
a--;
|
||||
}
|
||||
var c = {
|
||||
text: b
|
||||
"text": b
|
||||
};
|
||||
if (!(42 > 41)) {
|
||||
c = 'error';
|
||||
|
|
Loading…
Add table
Reference in a new issue