Skip to content

Commit 09d9efb

Browse files
committed
Add variations of empty span tests with whitespace omitted
1 parent 94622a2 commit 09d9efb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

cfgrammar/src/lib/yacc/parser.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,6 +2859,14 @@ Factor: ')' Expr ')';
28592859
(
28602860
"%start Expr
28612861
%%
2862+
Expr:| Factor;
2863+
Factor: ')' Expr ')';
2864+
",
2865+
(0, Span::new(20, 20)),
2866+
),
2867+
(
2868+
"%start Expr
2869+
%%
28622870
Expr: Factor | %empty;
28632871
Factor: ')' Expr ')';
28642872
",
@@ -2872,6 +2880,14 @@ Factor: ')' Expr ')';
28722880
",
28732881
(1, Span::new(30, 30)),
28742882
),
2883+
(
2884+
"%start Expr
2885+
%%
2886+
Expr: Factor|;
2887+
Factor: ')' Expr ')';
2888+
",
2889+
(1, Span::new(28, 28)),
2890+
),
28752891
];
28762892

28772893
for (i, (src, (empty_pidx, empty_span))) in empty_prod_conflicts.iter().enumerate() {

0 commit comments

Comments
 (0)