Babylon has a bug where it doesn't escape DirectiveLiteral properly. Except for `'use strict';`, this never happens in real world code, so let's put strings in a array in order to workaround this bug and have the same output on both parsers. https://github.com/babel/babylon/issues/289
24 lines
137 B
JavaScript
24 lines
137 B
JavaScript
[
|
|
"abc",
|
|
'abc',
|
|
|
|
'\'',
|
|
|
|
'"',
|
|
'\"',
|
|
'\\"',
|
|
|
|
"'",
|
|
"\'",
|
|
"\\'",
|
|
|
|
"'\"",
|
|
'\'"',
|
|
|
|
'\\',
|
|
"\\",
|
|
|
|
'\0',
|
|
'🐶',
|
|
];
|