From 6b8e45d89b22ed51751dc976068a0e0350edff4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Sat, 17 Dec 2022 15:29:12 -0300 Subject: Add whitespace parser --- package.lisp | 3 ++- parser.lisp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.lisp b/package.lisp index 50ce3df..6e868f9 100644 --- a/package.lisp +++ b/package.lisp @@ -19,4 +19,5 @@ #:nothing #:optional #:many - #:separated-list)) + #:separated-list + #:whitespace)) diff --git a/parser.lisp b/parser.lisp index 55ded57..7567b1f 100644 --- a/parser.lisp +++ b/parser.lisp @@ -134,3 +134,7 @@ (if include-separator (cons v (cons sep vn)) (cons v vn)))) + +(defparameter whitespace + (comp ((_ (optional (many (unit-if (lambda (x) (or (char= x #\Space) (char= x #\Newline) (char= x #\Tab)))))))) + nil)) -- cgit v1.2.3