Skip to content

Commit

Permalink
parser: remove one useless declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
eilvelia committed Jan 21, 2025
1 parent 882aaa5 commit 6d12aad
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,8 @@ document: BOM? xs=nodes EOF { xs } ;

nodes:
| NEWLINE* { [] }
| NEWLINE* x=node EOF { cons_if_some x [] }
| NEWLINE* x=node ";" xs=nodes { cons_if_some x xs }
| NEWLINE* x=node NEWLINE xs=nodes { cons_if_some x xs }
;

children_nodes:
| NEWLINE* { [] }
| NEWLINE* x=node ";" xs=children_nodes { cons_if_some x xs }
| NEWLINE* x=node NEWLINE xs=children_nodes { cons_if_some x xs }
| NEWLINE* x=node ";" xs=nodes { cons_if_some x xs }
| NEWLINE* x=node { cons_if_some x [] }
;

Expand Down Expand Up @@ -177,6 +170,4 @@ type_annot:
| "(" _x=error { error $loc(_x) "Expected a type annotation name" }
;

children:
| "{" xs=children_nodes "}" { xs }
;
children: "{" xs=nodes "}" { xs } ;

0 comments on commit 6d12aad

Please sign in to comment.