chiark
/
gitweb
/
~mdw
/
sod
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
65eebc3
)
src/module-parse.lisp (read-module): Provide sensible default error-recovery.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 26 Mar 2017 14:16:18 +0000
(15:16 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 8 Jun 2018 18:58:28 +0000
(19:58 +0100)
By default, if there's an error parsing a module item, skip and consume
until the next `;' or `}'. This actually seems to work quite well.
src/module-parse.lisp
patch
|
blob
|
blame
|
history
diff --git
a/src/module-parse.lisp
b/src/module-parse.lisp
index 197e3e4fb0e3071431d9d021bec2fd1e182a5984..211f2c74a84209960b7ef2c46c7a0bae73c318b9 100644
(file)
--- a/
src/module-parse.lisp
+++ b/
src/module-parse.lisp
@@
-112,7
+112,9
@@
(define-module (pathname :location location :truename truename)
(parse (skip-many ()
(seq ((pset (parse-property-set scanner))
(nil (error ()
- (plug module scanner pset))))
+ (plug module scanner pset)
+ (skip-until (:keep-end nil)
+ #\; #\}))))
(check-unused-properties pset))))
(declare (ignore consumedp))
(unless winp (syntax-error scanner result)))))))))