X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/239fa5bd3dff0b38b0cebdd3438311f21c24ba4f..c6b4ed992d81518f240509e6ab212d8fe705485a:/src/parser/parser-test.lisp diff --git a/src/parser/parser-test.lisp b/src/parser/parser-test.lisp index 6718d5c..1ca8780 100644 --- a/src/parser/parser-test.lisp +++ b/src/parser/parser-test.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -38,6 +38,7 @@ (once-only (string value winp consumedp) (with-gensyms (my-value my-winp my-consumedp label what) `(let ((,scanner (make-string-scanner ,string))) + (declare (ignorable ,scanner)) (multiple-value-bind (,my-value ,my-winp ,my-consumedp) (with-parser-context (character-scanner-context :scanner ,scanner) @@ -361,10 +362,11 @@ ;;;-------------------------------------------------------------------------- ;;; Test expression parser. -(defparse token (:context (context character-parser-context) parser) - (with-gensyms (value) - (expand-parser-spec context - `(seq ((,value ,parser) :whitespace) ,value)))) +(eval-when (:compile-toplevel :load-toplevel :execute) + (defparse token (:context (context character-parser-context) parser) + (with-gensyms (value) + (expand-parser-spec context + `(seq ((,value ,parser) :whitespace) ,value))))) (let ((add (binop "+" (x y 5) `(+ ,x ,y))) (sub (binop "-" (x y 5) `(- ,x ,y)))