Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Commit

Permalink
correct output of regexp and regenerate test
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Jan 11, 2017
1 parent e576a72 commit 5d620c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/plugins/estree.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pp.estreeParseRegExpLiteral = function ({ pattern, flags }) {
// In environments that don't support these flags value will
// be null as the regex can't be represented natively.
}
let node = this.parseLiteral(regex, "Literal");
let node = this.estreeParseLiteral(regex);
node.regex = { pattern, flags };

return node;
Expand Down
7 changes: 2 additions & 5 deletions test/fixtures/estree/literal/regexp/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,8 @@
"column": 13
}
},
"extra": {
"rawValue": "/\\/.*\\/i/",
"raw": "/.*/i"
},
"value": "/\\/.*\\/i/",
"value": "/.*/i",
"raw": "/.*/i",
"regex": {
"pattern": ".*",
"flags": "i"
Expand Down

0 comments on commit 5d620c9

Please sign in to comment.