-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow][match] Add test in Flow parser for export default of match exp…
…ression Summary: Adds a test case for export default of a match - making sure it is parsed as a match expression and not a match statement. Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D65850112 fbshipit-source-id: d90374b3b7f6ff8cde7f16bee7b033d3bd17fb1a
- Loading branch information
1 parent
a7e42ee
commit 870e4cc
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default match (a) {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"pattern_matching": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"type":"Program", | ||
"loc":{"source":null,"start":{"line":1,"column":0},"end":{"line":1,"column":28}}, | ||
"range":[0,28], | ||
"body":[ | ||
{ | ||
"type":"ExportDefaultDeclaration", | ||
"loc":{"source":null,"start":{"line":1,"column":0},"end":{"line":1,"column":28}}, | ||
"range":[0,28], | ||
"declaration":{ | ||
"type":"MatchExpression", | ||
"loc":{"source":null,"start":{"line":1,"column":15},"end":{"line":1,"column":27}}, | ||
"range":[15,27], | ||
"argument":{ | ||
"type":"Identifier", | ||
"loc":{"source":null,"start":{"line":1,"column":22},"end":{"line":1,"column":23}}, | ||
"range":[22,23], | ||
"name":"a", | ||
"typeAnnotation":null, | ||
"optional":false | ||
}, | ||
"cases":[] | ||
}, | ||
"exportKind":"value" | ||
} | ||
], | ||
"comments":[] | ||
} |