From c424156751208330cb9ca957e90758a5db445f72 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Sat, 28 Jan 2017 03:42:15 +0900 Subject: [PATCH] Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) --- src/plugins/flow.js | 2 +- .../type-annotations/existential-type-param-2/expected.json | 6 +++--- .../type-annotations/existential-type-param/expected.json | 4 ++-- .../flow/type-parameter-declaration/default/expected.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/flow.js b/src/plugins/flow.js index db2fc7724e..3aa7323e3e 100644 --- a/src/plugins/flow.js +++ b/src/plugins/flow.js @@ -676,7 +676,7 @@ pp.flowParsePrimaryType = function () { case tt.star: this.next(); - return this.finishNode(node, "ExistentialTypeParam"); + return this.finishNode(node, "ExistsTypeAnnotation"); default: if (this.state.type.keyword === "typeof") { diff --git a/test/fixtures/flow/type-annotations/existential-type-param-2/expected.json b/test/fixtures/flow/type-annotations/existential-type-param-2/expected.json index 12bf9c1462..ce2c3dc1c1 100644 --- a/test/fixtures/flow/type-annotations/existential-type-param-2/expected.json +++ b/test/fixtures/flow/type-annotations/existential-type-param-2/expected.json @@ -87,7 +87,7 @@ } }, "typeAnnotation": { - "type": "ExistentialTypeParam", + "type": "ExistsTypeAnnotation", "start": 8, "end": 9, "loc": { @@ -132,7 +132,7 @@ } }, "typeAnnotation": { - "type": "ExistentialTypeParam", + "type": "ExistsTypeAnnotation", "start": 30, "end": 31, "loc": { @@ -213,7 +213,7 @@ "value": true }, { - "type": "ExistentialTypeParam", + "type": "ExistsTypeAnnotation", "start": 24, "end": 25, "loc": { diff --git a/test/fixtures/flow/type-annotations/existential-type-param/expected.json b/test/fixtures/flow/type-annotations/existential-type-param/expected.json index d9e6a9657d..7739b86598 100644 --- a/test/fixtures/flow/type-annotations/existential-type-param/expected.json +++ b/test/fixtures/flow/type-annotations/existential-type-param/expected.json @@ -153,7 +153,7 @@ } }, { - "type": "ExistentialTypeParam", + "type": "ExistsTypeAnnotation", "start": 26, "end": 27, "loc": { @@ -190,4 +190,4 @@ ], "directives": [] } -} \ No newline at end of file +} diff --git a/test/fixtures/flow/type-parameter-declaration/default/expected.json b/test/fixtures/flow/type-parameter-declaration/default/expected.json index 32f556fd7e..e428993128 100644 --- a/test/fixtures/flow/type-parameter-declaration/default/expected.json +++ b/test/fixtures/flow/type-parameter-declaration/default/expected.json @@ -200,7 +200,7 @@ }, "name": "T", "default": { - "type": "ExistentialTypeParam", + "type": "ExistsTypeAnnotation", "start": 34, "end": 35, "loc": { @@ -3237,4 +3237,4 @@ ], "directives": [] } -} \ No newline at end of file +}