feat(compiler): adds support for quoted object keys in the parser

This commit is contained in:
Victor Berchet
2017-07-05 10:54:05 -07:00
committed by Jason Aden
parent 7ae8ad6aab
commit 798947efa4
5 changed files with 15 additions and 9 deletions

View File

@ -165,7 +165,7 @@ export function main() {
it('should parse map', () => {
checkAction('{}');
checkAction('{a: 1}[2]');
checkAction('{a: 1, "b": 2}[2]');
checkAction('{}["a"]');
});
@ -263,7 +263,7 @@ export function main() {
checkBinding('a(b | c)', 'a((b | c))');
checkBinding('a.b(c.d(e) | f)', 'a.b((c.d(e) | f))');
checkBinding('[1, 2, 3] | a', '([1, 2, 3] | a)');
checkBinding('{a: 1} | b', '({a: 1} | b)');
checkBinding('{a: 1, "b": 2} | c', '({a: 1, "b": 2} | c)');
checkBinding('a[b] | c', '(a[b] | c)');
checkBinding('a?.b | c', '(a?.b | c)');
checkBinding('true | a', '(true | a)');