X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=wolf;a=blobdiff_plain;f=src%2Fmain%2Fchecker.lisp;h=3a78d88980958db5d1085f47b31d2369ce687c99;hp=0e3dd7a39b4095508cadb59b801ed2c72e038f34;hb=02e970926c489005f408d69d363d017fb0abfe53;hpb=c9508457e34796fd7fcd8029ecd3209582f4c945 diff --git a/src/main/checker.lisp b/src/main/checker.lisp index 0e3dd7a..3a78d88 100644 --- a/src/main/checker.lisp +++ b/src/main/checker.lisp @@ -19,7 +19,7 @@ ; ; Exceptions ; * comments -; - multiline strings +; * multiline strings ; Some thoughts ; - form starting reader macros will have to be hand added to this code @@ -49,6 +49,7 @@ :beginning-of-line-with-comment-and-separator ; weird edge case part 2 :first-symbol ; first symbol of form/line :all ; matches everything + :in-string ))) (defun set-state (state) @@ -195,6 +196,15 @@ ((< 50 (- *line-no* (car form))) "Forms can't be over 50 lines long") (t (setf *form-ended-on-same-line* (= *line-no* (car form))) nil))))) (defevaluator :normal "::" (constantly "No internal symbols from other packages")) + (defevaluator :in-string "\\\\\"" (constantly nil)) + (defevaluator :normal "\"" (lambda () (set-state :in-string))) + (defevaluator :in-string "\"" (lambda () (set-state :normal))) + (defevaluator :in-string "\\n" + (lambda () + (incf *line-no*) + (setf *col-no* -1) + nil)) + (defevaluator :in-string "." (constantly nil)) (defevaluator :first-symbol "\\n" (constantly "No new line after opening form")) (defevaluator :first-symbol " " (constantly "No space after opening parens")) (defevaluator :first-symbol ""