summaryrefslogtreecommitdiff
path: root/input.lisp
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2024-10-12 02:16:30 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2024-10-12 02:16:30 -0300
commitaa7e4052fd22361ecf346ae1a2f6f30db0202c5c (patch)
treed2541752e275c96f770c16b2dc84024ae9728001 /input.lisp
parentae4fca1579102d3b6c6fbef05bf1013a6876693b (diff)
downloadmonparser-aa7e4052fd22361ecf346ae1a2f6f30db0202c5c.tar.gz
monparser-aa7e4052fd22361ecf346ae1a2f6f30db0202c5c.zip
Add surrounded parser
Diffstat (limited to 'input.lisp')
-rw-r--r--input.lisp3
1 files changed, 3 insertions, 0 deletions
diff --git a/input.lisp b/input.lisp
index dcea8f6..4edf6aa 100644
--- a/input.lisp
+++ b/input.lisp
@@ -25,6 +25,9 @@
:file (file input)
:cursor (+ (cursor input) amount)))
+(defun input-sub (input1 input2)
+ (- (cursor input1) (cursor input2)))
+
(defun from-string (str)
(make-instance 'input :data str))