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

Commit

Permalink
Merge pull request #68 from bzz/fix-block-comments
Browse files Browse the repository at this point in the history
Drop all comments for BlockStatement
  • Loading branch information
bzz authored Mar 15, 2019
2 parents 4eb5b4c + 19058d9 commit 7a2e9d1
Show file tree
Hide file tree
Showing 5 changed files with 1,090 additions and 138 deletions.
4 changes: 3 additions & 1 deletion driver/normalizer/normalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ var Normalizers = []Mapping{
Fields{
{Name: "body", Op: Var("stmts")},
{Name: "directives", Op: Arr()}, // TODO: find an example
//FIXME(bzz): save this once we agree how
// FIXME(bzz): make sure such comments are linked properly
{Name: "innerComments", Drop: true, Op: Any()},
{Name: "leadingComments", Drop: true, Op: Any()},
{Name: "trailingComments", Drop: true, Op: Any()},
},
Obj{
Expand Down
7 changes: 7 additions & 0 deletions fixtures/comment.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// This a comment
/* Another comment */
/** Yet another comment */

// Create dest - leadingComment
try {
fs.mkdirSync(dest, parseInt('0777', 8));
} catch (e) {
// like Unix's cp, keep going even if we can't create dest dir - innerComment
}
Loading

0 comments on commit 7a2e9d1

Please sign in to comment.