X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=wolf;a=blobdiff_plain;f=src%2Fmain%2Fchecker.lisp;h=a9c4082dad19d2558eb8ed18baac2f71f4958d8a;hp=b369a1bb5a07f84e066d501aedf28a37107404e7;hb=c03906d;hpb=49f4258f01eb8ab69f63730f381ba7116a90aeee diff --git a/src/main/checker.lisp b/src/main/checker.lisp index b369a1b..a9c4082 100644 --- a/src/main/checker.lisp +++ b/src/main/checker.lisp @@ -11,6 +11,7 @@ ; * in-package must be first line in file unless file is package.lisp ; - No whitespace only lines ; - No empty lines at end of file +; * Only one in-package per file ; ; Some thoughts ; - form starting reader macros will have to be hand added to this code @@ -104,8 +105,9 @@ (lambda () (set-state :normal) nil)) (defevaluator :begin ".*" - (lambda () - "Must begin with in-package form")) + (constantly "Must begin with in-package form")) + (defevaluator :normal "\\( *in-package " + (constantly "Only one in-package per file")) (defevaluator :normal "\\n" (lambda () (incf *line-no*) @@ -121,9 +123,9 @@ (lambda () (let ((form (pop *form-stack*))) - (when - (< 50 (- *line-no* (car form))) - "Forms can't be over 50 lines long")))) + (cond + ((not form) "Unmatched ending paren") + ((< 50 (- *line-no* (car form))) "Forms can't be over 50 lines long"))))) (defevaluator :normal "." (constantly nil)) )