diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2025-06-06 02:12:34 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2025-06-06 02:12:34 -0300 |
commit | 35c3281a9ad02c9c345f4315fba36dd6d16549aa (patch) | |
tree | 06fdafe260f766258e203aa2ac9a9d9ebb23c01a | |
parent | 66e85e52ec8ef84275e2051a5ed2ab0e7c6cbea3 (diff) | |
download | monparser-35c3281a9ad02c9c345f4315fba36dd6d16549aa.tar.gz monparser-35c3281a9ad02c9c345f4315fba36dd6d16549aa.zip |
Make unit more generic and remove unused variable in comp
-rw-r--r-- | core.lisp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,7 +6,7 @@ (defmacro unit (&optional predicate) (cond ((null predicate) - (setf predicate '(characterp it))) + (setf predicate 't)) ((symbolp predicate) (setf predicate `(,predicate it))) ((characterp predicate) @@ -59,12 +59,12 @@ (declare (ignore lazy)) (lazily-select-parser input (list ,first-parser ,second-parser ,@other-parsers)))) +;;; TODO: Find a way to be able to use the input without needing to define a name for it. (defmacro comp (bindings &body body) (if (null bindings) `(new (progn ,@body)) (let ((var (first (car bindings))) (parser (second (car bindings))) - (lazy (third (car bindings))) (unused (gensym))) (if (symbolp var) (if (string= (symbol-name var) "_") |