Simplify simplify

This commit is contained in:
Dane Johnson 2022-02-01 10:57:50 -06:00
parent 49badc37a4
commit acb27abb34

View File

@ -47,8 +47,7 @@ peg::parser! {
rule funcall() -> Expr<'input>
= i:id() "(" _ e:(expr() ** ("," _)) ")" _ { Expr::Funcall(i, e) }
rule funcdef() -> Expr<'input>
= i:id()? "->" _ e:expr() { Expr::Funcdef(i, Box::new(e)) } /
i:id()? "->" _ b:block() { Expr::Funcdef(i, Box::new(b)) }
= i:id()? "->" _ e:(expr() / block()) { Expr::Funcdef(i, Box::new(e)) }
rule letter()
= ['A'..='Z'] / ['a'..='z']