mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
allowing quoted strings within object assignment, a in JS and JSON
This commit is contained in:
@@ -121,6 +121,7 @@ rule
|
|||||||
# Assignment within an object literal.
|
# Assignment within an object literal.
|
||||||
AssignObj:
|
AssignObj:
|
||||||
IDENTIFIER ":" Expression { result = AssignNode.new(val[0], val[2], :object) }
|
IDENTIFIER ":" Expression { result = AssignNode.new(val[0], val[2], :object) }
|
||||||
|
| STRING ":" Expression { result = AssignNode.new(val[0], val[2], :object) }
|
||||||
| Comment { result = val[0] }
|
| 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--.
|
a--.
|
||||||
|
|
||||||
c: {
|
c: {
|
||||||
text: b
|
"text": b
|
||||||
}
|
}
|
||||||
|
|
||||||
c: 'error' unless 42 > 41
|
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--;
|
a--;
|
||||||
}
|
}
|
||||||
var c = {
|
var c = {
|
||||||
text: b
|
"text": b
|
||||||
};
|
};
|
||||||
if (!(42 > 41)) {
|
if (!(42 > 41)) {
|
||||||
c = 'error';
|
c = 'error';
|
||||||
|
|||||||
Reference in New Issue
Block a user