(fire-error (format nil "Type line did not match \" TYPE: type-definition\": ~A" type-line)))
(cl-ppcre:register-groups-bind (type def) (type-scanner type-line)
(let
- ((decomposed-def (or (or-type def) (list-type def) (asterisk-type def) (symbol-type def))))
+ ((decomposed-def (or (list-type def) (or-type def) (asterisk-type def) (symbol-type def))))
+ ; This error should never be fired off, as the above regexes match everything
(when (not decomposed-def) (fire-error (format nil "Couldn't figure out how to decompose: ~A" def)))
(list
type
(process-examples))))
(defun parse-examples ()
+ ; This error should never be fired off, as the only way description ends is if it ran into EXAMPLES
(when (string/= "EXAMPLES:" (next)) (fire-error (format nil "Expected EXAMPLES: instead of: ~A" (prev-line))))
(expect-blank-line)
(list :examples (process-examples)))
(when (not (cl-ppcre:scan scanner (peek)))
(fire-error (format nil "First line of ~A did not match: ~A {ARGS}* => {RESULT}*, ~A" func func-name (peek))))
(cl-ppcre:register-groups-bind (args result) (scanner (next))
- (when (cl-ppcre:scan "[a-z]" func-name)
- (fire-error (format nil "Function name should be all uppercase: ~A" func-name)))
(let
((ast-of-start
(list
(cond
((stringp text) text)
((and (listp text) (eql :keyword (car text))) (format nil "_~(~A~)_" (cadr text)))
+ ; This error should never get fired, as it would only if there were a bug in the conversion code
(t (fire-error (format nil "Don't know how to convert text: ~S" text)))))
(cadr text))))