This repository was archived by the owner on Mar 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -137,16 +137,25 @@ var Normalizers = []Mapping{
137
137
{Name : "source" , Op : Var ("path" )},
138
138
// empty un-used array
139
139
{Name : "specifiers" , Drop : true , Op : Arr ()},
140
+ // FIXME(bzz): make sure such comments are linked properly
141
+ {Name : "leadingComments" , Drop : true , Op : Any ()},
142
+ {Name : "trailingComments" , Drop : true , Op : Any ()},
140
143
},
141
144
Obj {
142
145
"Path" : Var ("path" ),
143
146
},
144
147
)),
148
+ // importKind switch, set only by flow plugin
149
+ // https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md#importdeclaration
150
+ // TODO(bzz): this mapping misses 'typeof' case
145
151
MapSemantic ("ImportDeclaration" , uast.Import {}, MapObj (
146
152
CasesObj ("case" ,
147
153
// common
148
- Obj {
149
- "source" : Var ("path" ),
154
+ Fields {
155
+ {Name : "source" , Op : Var ("path" )},
156
+ // FIXME(bzz): make sure such comments are linked properly
157
+ {Name : "leadingComments" , Drop : true , Op : Any ()},
158
+ {Name : "trailingComments" , Drop : true , Op : Any ()},
150
159
},
151
160
Objs {
152
161
// namespace
You can’t perform that action at this time.
0 commit comments