diff --git a/src/plugins/flow.js b/src/plugins/flow.js index 0b1f851db0..96dcad9d66 100644 --- a/src/plugins/flow.js +++ b/src/plugins/flow.js @@ -687,7 +687,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, "NumericLiteralTypeAnnotation"); + return this.finishNode(node, "NumberLiteralTypeAnnotation"); } case tt.num: @@ -695,7 +695,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, "NumericLiteralTypeAnnotation"); + return this.finishNode(node, "NumberLiteralTypeAnnotation"); case tt._null: node.value = this.match(tt._null); diff --git a/test/fixtures/flow/anonymous-function-no-parens-types/good_05/expected.json b/test/fixtures/flow/anonymous-function-no-parens-types/good_05/expected.json index 073bb795bf..94ac983cb5 100644 --- a/test/fixtures/flow/anonymous-function-no-parens-types/good_05/expected.json +++ b/test/fixtures/flow/anonymous-function-no-parens-types/good_05/expected.json @@ -164,7 +164,7 @@ ], "rest": null, "returnType": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 24, "end": 27, "loc": { diff --git a/test/fixtures/flow/anonymous-function-types/good_10/expected.json b/test/fixtures/flow/anonymous-function-types/good_10/expected.json index e522809a4c..ffb3d792e6 100644 --- a/test/fixtures/flow/anonymous-function-types/good_10/expected.json +++ b/test/fixtures/flow/anonymous-function-types/good_10/expected.json @@ -168,7 +168,7 @@ ], "rest": null, "returnType": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 28, "end": 31, "loc": { diff --git a/test/fixtures/flow/anonymous-function-types/good_13/expected.json b/test/fixtures/flow/anonymous-function-types/good_13/expected.json index 0448cdbd22..829f2cc872 100644 --- a/test/fixtures/flow/anonymous-function-types/good_13/expected.json +++ b/test/fixtures/flow/anonymous-function-types/good_13/expected.json @@ -158,7 +158,7 @@ ], "rest": null, "returnType": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 26, "end": 29, "loc": { diff --git a/test/fixtures/flow/anonymous-function-types/good_14/expected.json b/test/fixtures/flow/anonymous-function-types/good_14/expected.json index 3aa12410f0..72b991f723 100644 --- a/test/fixtures/flow/anonymous-function-types/good_14/expected.json +++ b/test/fixtures/flow/anonymous-function-types/good_14/expected.json @@ -118,7 +118,7 @@ }, "types": [ { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 15, "end": 16, "loc": { @@ -138,7 +138,7 @@ } }, { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 19, "end": 20, "loc": { diff --git a/test/fixtures/flow/literal-types/number-binary/expected.json b/test/fixtures/flow/literal-types/number-binary/expected.json index 44d455a56d..2f0fde7e23 100644 --- a/test/fixtures/flow/literal-types/number-binary/expected.json +++ b/test/fixtures/flow/literal-types/number-binary/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 16, "loc": { diff --git a/test/fixtures/flow/literal-types/number-float/expected.json b/test/fixtures/flow/literal-types/number-float/expected.json index 4cdb637a55..3b07b2d152 100644 --- a/test/fixtures/flow/literal-types/number-float/expected.json +++ b/test/fixtures/flow/literal-types/number-float/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 12, "loc": { diff --git a/test/fixtures/flow/literal-types/number-integer/expected.json b/test/fixtures/flow/literal-types/number-integer/expected.json index 9b9a6da608..dd2263c75e 100644 --- a/test/fixtures/flow/literal-types/number-integer/expected.json +++ b/test/fixtures/flow/literal-types/number-integer/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 10, "loc": { diff --git a/test/fixtures/flow/literal-types/number-negative-binary/expected.json b/test/fixtures/flow/literal-types/number-negative-binary/expected.json index 44d455a56d..2f0fde7e23 100644 --- a/test/fixtures/flow/literal-types/number-negative-binary/expected.json +++ b/test/fixtures/flow/literal-types/number-negative-binary/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 16, "loc": { diff --git a/test/fixtures/flow/literal-types/number-negative-float/expected.json b/test/fixtures/flow/literal-types/number-negative-float/expected.json index 735c2e093f..9d7ecefb77 100644 --- a/test/fixtures/flow/literal-types/number-negative-float/expected.json +++ b/test/fixtures/flow/literal-types/number-negative-float/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 13, "loc": { diff --git a/test/fixtures/flow/literal-types/number-negative-octal-2/expected.json b/test/fixtures/flow/literal-types/number-negative-octal-2/expected.json index 489e2faac9..06ef646088 100644 --- a/test/fixtures/flow/literal-types/number-negative-octal-2/expected.json +++ b/test/fixtures/flow/literal-types/number-negative-octal-2/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 13, "loc": { diff --git a/test/fixtures/flow/literal-types/number-negative-octal/expected.json b/test/fixtures/flow/literal-types/number-negative-octal/expected.json index 2ac2c96235..dd0a65307c 100644 --- a/test/fixtures/flow/literal-types/number-negative-octal/expected.json +++ b/test/fixtures/flow/literal-types/number-negative-octal/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 12, "loc": { diff --git a/test/fixtures/flow/literal-types/number-octal-2/expected.json b/test/fixtures/flow/literal-types/number-octal-2/expected.json index 7c7b41adc3..f57f036c6e 100644 --- a/test/fixtures/flow/literal-types/number-octal-2/expected.json +++ b/test/fixtures/flow/literal-types/number-octal-2/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 12, "loc": { diff --git a/test/fixtures/flow/literal-types/number-octal/expected.json b/test/fixtures/flow/literal-types/number-octal/expected.json index 608b0731b2..bd69b4d140 100644 --- a/test/fixtures/flow/literal-types/number-octal/expected.json +++ b/test/fixtures/flow/literal-types/number-octal/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 7, "end": 11, "loc": { diff --git a/test/fixtures/flow/type-annotations/129/expected.json b/test/fixtures/flow/type-annotations/129/expected.json index e55c90e118..d5fd461dfe 100644 --- a/test/fixtures/flow/type-annotations/129/expected.json +++ b/test/fixtures/flow/type-annotations/129/expected.json @@ -103,7 +103,7 @@ }, "types": [ { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 10, "end": 11, "loc": { @@ -123,7 +123,7 @@ } }, { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 15, "end": 16, "loc": { diff --git a/test/fixtures/flow/type-annotations/130/expected.json b/test/fixtures/flow/type-annotations/130/expected.json index 2a823858a4..26a0c561a6 100644 --- a/test/fixtures/flow/type-annotations/130/expected.json +++ b/test/fixtures/flow/type-annotations/130/expected.json @@ -109,7 +109,7 @@ }, "types": [ { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 16, "end": 17, "loc": { @@ -129,7 +129,7 @@ } }, { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 20, "end": 21, "loc": { @@ -198,7 +198,7 @@ }, "types": [ { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 28, "end": 29, "loc": { @@ -218,7 +218,7 @@ } }, { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 32, "end": 33, "loc": { diff --git a/test/fixtures/flow/type-annotations/builtin/expected.json b/test/fixtures/flow/type-annotations/builtin/expected.json index 8c51c73f05..189484fe9d 100644 --- a/test/fixtures/flow/type-annotations/builtin/expected.json +++ b/test/fixtures/flow/type-annotations/builtin/expected.json @@ -637,7 +637,7 @@ }, "typeParameters": null, "right": { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 215, "end": 216, "loc": { diff --git a/test/fixtures/flow/type-annotations/negative-number-literal/expected.json b/test/fixtures/flow/type-annotations/negative-number-literal/expected.json index e4b1cc8f02..3d3cc852fc 100644 --- a/test/fixtures/flow/type-annotations/negative-number-literal/expected.json +++ b/test/fixtures/flow/type-annotations/negative-number-literal/expected.json @@ -76,7 +76,7 @@ }, "types": [ { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 45, "end": 47, "loc": { @@ -96,7 +96,7 @@ } }, { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 52, "end": 53, "loc": { @@ -116,7 +116,7 @@ } }, { - "type": "NumericLiteralTypeAnnotation", + "type": "NumberLiteralTypeAnnotation", "start": 58, "end": 59, "loc": {