rename NumberLiteral to NumericLiteral and RegexLiteral to RegExpLiteral
This commit is contained in:
@@ -40,7 +40,7 @@ pp.checkPropClash = function (prop, propHash) {
|
||||
break;
|
||||
|
||||
case "StringLiteral":
|
||||
case "NumberLiteral":
|
||||
case "NumericLiteral":
|
||||
name = String(key.value);
|
||||
break;
|
||||
|
||||
@@ -417,13 +417,13 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
|
||||
|
||||
case tt.regexp:
|
||||
let value = this.state.value;
|
||||
node = this.parseLiteral(value.value, "RegexLiteral");
|
||||
node = this.parseLiteral(value.value, "RegExpLiteral");
|
||||
node.pattern = value.pattern;
|
||||
node.flags = value.flags;
|
||||
return node;
|
||||
|
||||
case tt.num:
|
||||
return this.parseLiteral(this.state.value, "NumberLiteral");
|
||||
return this.parseLiteral(this.state.value, "NumericLiteral");
|
||||
|
||||
case tt.string:
|
||||
return this.parseLiteral(this.state.value, "StringLiteral");
|
||||
|
||||
@@ -506,7 +506,7 @@ pp.flowParsePrimaryType = function () {
|
||||
this.addExtra(node, "rawValue", node.value);
|
||||
this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
|
||||
this.next();
|
||||
return this.finishNode(node, "NumberLiteralTypeAnnotation");
|
||||
return this.finishNode(node, "NumericLiteralTypeAnnotation");
|
||||
|
||||
default:
|
||||
if (this.state.type.keyword === "typeof") {
|
||||
|
||||
Reference in New Issue
Block a user