Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit c0c3f18

Browse files
committed
sem: map JSXIdentifier -> uast:Identifier
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent 0be5d4a commit c0c3f18

File tree

6 files changed

+1419
-9
lines changed

6 files changed

+1419
-9
lines changed

driver/normalizer/normalizer.go

+8
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ var Normalizers = []Mapping{
8989
"Name": Var("name"),
9090
},
9191
)),
92+
MapSemantic("JSXIdentifier", uast.Identifier{}, MapObj(
93+
Obj{
94+
"name": Var("name"),
95+
},
96+
Obj{
97+
"Name": Var("name"),
98+
},
99+
)),
92100
MapSemantic("StringLiteral", uast.String{}, MapObj(
93101
Fields{
94102
{Name: "value", Op: singleQuote{Var("val")}},

fixtures/issue58.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class TestIdTestApp extends React.Component {
2+
render() {
3+
return (
4+
<View>
5+
<Text testID="Text">text</Text>
6+
</View>
7+
);
8+
}
9+
}

0 commit comments

Comments
 (0)