diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2022-11-03 03:37:49 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2022-11-03 03:37:49 -0300 |
commit | 94dda7a8e56d6db537e307b1ec3cf59b8d70a629 (patch) | |
tree | 4b00811c9b5393a23ae34ef320965d39bb32453b | |
parent | fc47efcfc2ac497b4e013e68ea0984232b5c3e71 (diff) | |
download | monparser-94dda7a8e56d6db537e307b1ec3cf59b8d70a629.tar.gz monparser-94dda7a8e56d6db537e307b1ec3cf59b8d70a629.zip |
Add empty value feature to comp
-rw-r--r-- | parser.lisp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/parser.lisp b/parser.lisp index 37abb75..30c68fd 100644 --- a/parser.lisp +++ b/parser.lisp @@ -54,7 +54,9 @@ `(new (progn ,@body)) (let ((v (first (car bindings))) (p (second (car bindings)))) - `(bind ,p (lambda (,v) (comp ,(cdr bindings) ,@body)))))) + (if (eq v '_) + `(bind ,p (lambda () (comp ,(cdr bindings) ,@body))) + `(bind ,p (lambda (,v) (comp ,(cdr bindings) ,@body))))))) (defparameter nothing (new nil)) |