X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/d9c15186bf79bcac3caf752dd0936233778aa8f2..ddee4bb174ad62e6a9d7ecb49d69867fb2b4742c:/lex.lisp?ds=sidebyside diff --git a/lex.lisp b/lex.lisp index 1583b11..2d1c4de 100644 --- a/lex.lisp +++ b/lex.lisp @@ -231,8 +231,7 @@ "struct" "union" "enum")) (defclass sod-lexer (lexer) - ((keywords :initarg :keywords :initform *sod-keywords* - :type hash-table :reader lexer-keywords)) + () (:documentation "Lexical analyser for the SOD lanuage. @@ -310,9 +309,8 @@ (char= ch #\_)))) (return)))))) - ;; Check to see whether we match any keywords. - (multiple-value-bind (keyword foundp) (gethash id keywords) - (return (values (if foundp keyword :id) id))))) + ;; Done. + (return (values :id id)))) ;; Pick out numbers. Currently only integers, but we support ;; multiple bases.