chiark / gitweb /
src/final.lisp: Add a new function for testing property-set parsing.
[sod] / src / final.lisp
index 0b7a36617cce33be0088ff981e191b8049f30c0c..93fafe86e65ef3a738bdc4df222bb763e036013e 100644 (file)
@@ -93,6 +93,15 @@ (defun test-parse-c-type (string)
                  (princ-to-string (car value)))
          (values nil value)))))
 
+(export 'test-parse-pset)
+(defun test-parse-pset (string)
+  "Parse STRING as a property set, and show the results."
+  (with-test-scanner (scanner string)
+    (multiple-value-bind (value winp consumedp)
+       (parse-property-set scanner)
+      (declare (ignore consumedp))
+      (values winp value))))
+
 (export 'test-parser)
 (defmacro test-parser ((scanner &key backtrace) parser input)
   "Convenient macro for testing parsers at the REPL.