* Add Subsume JSON transform https://github.com/tc39/proposal-json-superset is at stage 3. This allows U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR to appear unescaped inside strings and directives. * Move to Stage 3 * Break diretive parsing * Update README * Handle multi-escape sequences * Remove babylon files after rename
105 lines
2.0 KiB
JSON
105 lines
2.0 KiB
JSON
{
|
||
"type": "File",
|
||
"start": 0,
|
||
"end": 103,
|
||
"loc": {
|
||
"start": {
|
||
"line": 1,
|
||
"column": 0
|
||
},
|
||
"end": {
|
||
"line": 2,
|
||
"column": 87
|
||
}
|
||
},
|
||
"program": {
|
||
"type": "Program",
|
||
"start": 0,
|
||
"end": 103,
|
||
"loc": {
|
||
"start": {
|
||
"line": 1,
|
||
"column": 0
|
||
},
|
||
"end": {
|
||
"line": 2,
|
||
"column": 87
|
||
}
|
||
},
|
||
"sourceType": "script",
|
||
"body": [],
|
||
"directives": [
|
||
{
|
||
"type": "Directive",
|
||
"start": 0,
|
||
"end": 15,
|
||
"loc": {
|
||
"start": {
|
||
"line": 1,
|
||
"column": 0
|
||
},
|
||
"end": {
|
||
"line": 1,
|
||
"column": 15
|
||
}
|
||
},
|
||
"value": {
|
||
"type": "DirectiveLiteral",
|
||
"start": 0,
|
||
"end": 14,
|
||
"loc": {
|
||
"start": {
|
||
"line": 1,
|
||
"column": 0
|
||
},
|
||
"end": {
|
||
"line": 1,
|
||
"column": 14
|
||
}
|
||
},
|
||
"value": "before
after",
|
||
"extra": {
|
||
"raw": "\"before
after\"",
|
||
"rawValue": "before
after"
|
||
}
|
||
},
|
||
"trailingComments": [
|
||
{
|
||
"type": "CommentLine",
|
||
"value": " ^ That's a U+2029 PARAGRAPH SEPARATOR UTF-16 char (between 'before' and 'after')",
|
||
"start": 16,
|
||
"end": 103,
|
||
"loc": {
|
||
"start": {
|
||
"line": 2,
|
||
"column": 0
|
||
},
|
||
"end": {
|
||
"line": 2,
|
||
"column": 87
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"comments": [
|
||
{
|
||
"type": "CommentLine",
|
||
"value": " ^ That's a U+2029 PARAGRAPH SEPARATOR UTF-16 char (between 'before' and 'after')",
|
||
"start": 16,
|
||
"end": 103,
|
||
"loc": {
|
||
"start": {
|
||
"line": 2,
|
||
"column": 0
|
||
},
|
||
"end": {
|
||
"line": 2,
|
||
"column": 87
|
||
}
|
||
}
|
||
}
|
||
]
|
||
} |