Skip to content

Commit 3e1f859

Browse files
committed
Add test to cover edge case in parser
This adds coverage for the only branch in parser.rs that was not covered by a test previously.
1 parent aa4dbf6 commit 3e1f859

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(x)
2+
// A comment is not allowed here, but the parser does need
3+
// to skip over it in the lookahead.
4+
=> true
5+
6+
# output:
7+
stdin:2:1
8+
9+
2 │ // A comment is not allowed here, but the parser does need
10+
╵ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11+
Error: A comment is not allowed here.
12+
13+
stdin:1:3
14+
15+
1 │ (x)
16+
╵ ^
17+
Note: Try inserting the comment above this instead.

0 commit comments

Comments
 (0)