From 65eebc3b1882c74ea1e3e6eefbb1aecb10802b61 Mon Sep 17 00:00:00 2001 Message-Id: <65eebc3b1882c74ea1e3e6eefbb1aecb10802b61.1726882072.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 26 May 2016 09:26:09 +0100 Subject: [PATCH] src/module-parse.lisp: Don't explicitly ask for default behaviour. Organization: Straylight/Edgeware From: Mark Wooding * Reporting the scanner position as the error location. * Setting at-least-one when parsing delimitered lists. * Keeping the terminator when skipping to one of several terminator tokens. --- src/module-parse.lisp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/module-parse.lisp b/src/module-parse.lisp index 4d4d818..197e3e4 100644 --- a/src/module-parse.lisp +++ b/src/module-parse.lisp @@ -35,7 +35,7 @@ (define-pluggable-parser module typename (scanner pset) (declare (ignore pset)) (with-parser-context (token-scanner-context :scanner scanner) (parse (and "typename" - (skip-many (:min 1) + (skip-many () (seq ((id :id)) (if (gethash id *module-type-map*) (cerror* "Type `~A' already defined" id) @@ -178,7 +178,7 @@ (define-pluggable-parser module set (scanner pset) (parse (skip-many (:min 0) (error (:ignore-unconsumed t) (parse-property scanner module-pset) - (skip-until (:keep-end t) #\, #\;)) + (skip-until () #\, #\;)) #\,)))) #\;)))) @@ -351,8 +351,7 @@ (defun parse-class-body (scanner pset name supers) ;; definition; otherwise it might be a message or slot. (cond ((not (typep type 'c-function-type)) (when (consp name) - (cerror*-with-location - scanner + (cerror* "Method declarations must have function type") (setf name (cdr name))) (parse-slot-item sub-pset base-type type name)) -- [mdw]