From 474df4a3ae15995f95defb536939bf62d1b3f064 Mon Sep 17 00:00:00 2001 From: rvcas Date: Wed, 8 Jun 2022 23:22:34 -0400 Subject: [PATCH] fix: different attempt --- crates/uplc/src/parser.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/crates/uplc/src/parser.rs b/crates/uplc/src/parser.rs index 38d7120c..4b2473de 100644 --- a/crates/uplc/src/parser.rs +++ b/crates/uplc/src/parser.rs @@ -93,26 +93,16 @@ fn term() -> impl Parser, Error = Simple> { }); let apply = recursive(|a| { - let lambda = keyword("lam") - .ignore_then(name().padded()) - .then(term.clone()) - .delimited_by(just('(').padded(), just(')').padded()) - .map(|(parameter_name, t)| Term::Lambda { - parameter_name, - body: Box::new(t), - }); - var() - .or(lambda) - .or(a.delimited_by(just('[').padded(), just(']').padded())) + .or(term.clone()) .padded() - .then(term) - .delimited_by(just('[').padded(), just(']').padded()) + .then(a) .map(|(function, argument)| Term::Apply { function: Box::new(function), argument: Box::new(argument), }) - }); + }) + .delimited_by(just('[').padded(), just(']').padded()); constant() .or(builtin())