Merge branch 'master' into 7.0
This commit is contained in:
@@ -18,11 +18,7 @@ pp.estreeParseRegExpLiteral = function ({ pattern, flags }) {
|
||||
};
|
||||
|
||||
pp.estreeParseLiteral = function (value) {
|
||||
const node = this.parseLiteral(value, "Literal");
|
||||
node.raw = node.extra.raw;
|
||||
delete node.extra;
|
||||
|
||||
return node;
|
||||
return this.parseLiteral(value, "Literal");
|
||||
};
|
||||
|
||||
pp.directiveToStmt = function (directive) {
|
||||
@@ -177,6 +173,16 @@ export default function (instance) {
|
||||
};
|
||||
});
|
||||
|
||||
instance.extend("parseLiteral", function(inner) {
|
||||
return function (...args) {
|
||||
const node = inner.call(this, ...args);
|
||||
node.raw = node.extra.raw;
|
||||
delete node.extra;
|
||||
|
||||
return node;
|
||||
};
|
||||
});
|
||||
|
||||
instance.extend("parseMethod", function(inner) {
|
||||
return function (node, ...args) {
|
||||
let funcNode = this.startNode();
|
||||
|
||||
Reference in New Issue
Block a user