diff --git a/ast_test.go b/ast_test.go
index <HASH>..<HASH> 100644
--- a/ast_test.go
+++ b/ast_test.go
@@ -283,7 +283,7 @@ var astTests = []testCase{
 		},
 	},
 	{
-		[]string{"foo | bar", "foo|bar"},
+		[]string{"foo | bar", "foo|bar", "foo |\n#etc\nbar"},
 		BinaryExpr{
 			Op: OR,
 			X:  litStmt("foo"),
diff --git a/parse.go b/parse.go
index <HASH>..<HASH> 100644
--- a/parse.go
+++ b/parse.go
@@ -654,6 +654,8 @@ func (p *parser) gotStmt(s *Stmt, wantStop bool) bool {
 func (p *parser) binaryExpr(op Token, left Stmt) (b BinaryExpr) {
 	b.OpPos = p.lpos
 	b.Op = op
+	for p.got('#') {
+	}
 	p.wantFollowStmt(op.String(), &b.Y, true)
 	b.X = left
 	return
Fix comments right after a binary operator