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

Commit 19058d9

Browse files
committed
sem: drop all comments for BlockStatement
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent 4eb5b4c commit 19058d9

File tree

5 files changed

+1090
-138
lines changed

5 files changed

+1090
-138
lines changed

driver/normalizer/normalizer.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ var Normalizers = []Mapping{
136136
Fields{
137137
{Name: "body", Op: Var("stmts")},
138138
{Name: "directives", Op: Arr()}, // TODO: find an example
139-
//FIXME(bzz): save this once we agree how
139+
// FIXME(bzz): make sure such comments are linked properly
140+
{Name: "innerComments", Drop: true, Op: Any()},
141+
{Name: "leadingComments", Drop: true, Op: Any()},
140142
{Name: "trailingComments", Drop: true, Op: Any()},
141143
},
142144
Obj{

fixtures/comment.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
// This a comment
22
/* Another comment */
33
/** Yet another comment */
4+
5+
// Create dest - leadingComment
6+
try {
7+
fs.mkdirSync(dest, parseInt('0777', 8));
8+
} catch (e) {
9+
// like Unix's cp, keep going even if we can't create dest dir - innerComment
10+
}

0 commit comments

Comments
 (0)