Skip to content

Commit

Permalink
Fix: parse unicode escapes in identifiers (fixes #181)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Dec 1, 2015
1 parent 3086c02 commit 72f22bf
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
module.exports = {
"type": "Program",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 11
}
},
"range": [
0,
11
],
"body": [
{
"type": "VariableDeclaration",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 11
}
},
"range": [
0,
11
],
"declarations": [
{
"type": "VariableDeclarator",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 10
}
},
"range": [
4,
10
],
"id": {
"type": "Identifier",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 10
}
},
"range": [
4,
10
],
"name": "A"
},
"init": null
}
],
"kind": "var"
}
],
"sourceType": "script",
"tokens": [
{
"type": "Keyword",
"value": "var",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 3
}
},
"range": [
0,
3
]
},
{
"type": "Identifier",
"value": "A",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 10
}
},
"range": [
4,
10
]
},
{
"type": "Punctuator",
"value": ";",
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 11
}
},
"range": [
10,
11
]
}
]
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var \u{41};

0 comments on commit 72f22bf

Please sign in to comment.