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

Commit 4339383

Browse files
committed
sem: drop ImportDeclaration>[leadingComments trailingComments]
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent de29ab0 commit 4339383

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

driver/normalizer/normalizer.go

+11
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ var Preprocessors = []Mapping{
7474
uast.KeyType: String("ImportNamespaceSpecifier"),
7575
}),
7676
),
77+
// FIXME(bzz): make sure such comments are mapped properly
78+
Map(
79+
Fields{
80+
{Name: uast.KeyType, Op: String("ImportDeclaration")},
81+
{Name: "leadingComments", Drop: true, Op: Any()},
82+
{Name: "trailingComments", Drop: true, Op: Any()},
83+
},
84+
Obj{
85+
uast.KeyType: String("ImportDeclaration"),
86+
},
87+
),
7788
}
7889

7990
// Normalizers is the main block of normalization rules to convert native AST to semantic UAST.

0 commit comments

Comments
 (0)