summaryrefslogtreecommitdiff
path: root/test.lisp
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2026-10-25 17:11:22 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2026-10-25 17:11:22 -0300
commit8203d8f2f8bc7f31c98ac4d926de9b35c4bd1669 (patch)
tree1528fb1f17bebaf6bc2ab0aaaa8b6a670e8f6373 /test.lisp
parentc2bc2dbc61a5df9c3a5dfb19cefd83dae93266db (diff)
downloadmonparser-8203d8f2f8bc7f31c98ac4d926de9b35c4bd1669.tar.gz
monparser-8203d8f2f8bc7f31c98ac4d926de9b35c4bd1669.zip
Add a until variant to many
Diffstat (limited to 'test.lisp')
-rw-r--r--test.lisp17
1 files changed, 6 insertions, 11 deletions
diff --git a/test.lisp b/test.lisp
index ea50ca8..7fe0e0e 100644
--- a/test.lisp
+++ b/test.lisp
@@ -34,17 +34,12 @@
(optional (many (unit #'whitespace?))))
(defparser lazy-test ()
- (within whitespace
- (one-of (unit #\h)
- (comp ((_ (unit #\{))
- (body (optional (many (lazy lazy-test))))
- (_ (unit #\})))
- body)
- (comp ((_ (unit #\())
- (body (optional (many (lazy lazy-test))))
- (_ (unit #\))))
- body)
- (unit))))
+ (one-of (unit #\h)
+ (comp ((_ (unit #\())
+ (body (optional (many (lazy lazy-test) :until (unit #\)))))
+ (_ (unit #\))))
+ body)
+ (unit)))
(define-tests
((unit) "hello" #\h)