Browse Source

fix empty tuple pattern

Getty Ritter 2 years ago
parent
commit
0f3a9627e4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/grammar.lalrpop

+ 1 - 0
src/grammar.lalrpop

@@ -137,6 +137,7 @@ pub Pat: Pat = {
     "_" => Pat::Wildcard,
     <Literal> => Pat::Lit(<>),
     <Name> => Pat::Var(<>),
+    "<" ">" => Pat::Tup(Vec::new()),
     "<" <mut ps:(<Pat> ",")*> <p:Pat> ">" => {
         ps.push(p);
         Pat::Tup(ps)