Function: opascal-is-simple-class-type
opascal-is-simple-class-type is a byte-compiled function defined in
opascal.el.gz.
Signature
(opascal-is-simple-class-type AT-TOKEN LIMIT-TOKEN)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/opascal.el.gz
(defun opascal-is-simple-class-type (at-token limit-token)
;; True if at-token is the start of a simple class type. E.g.
;; class of TClass;
;; class (TBaseClass);
;; class;
(when (memq (opascal-token-kind at-token) opascal-class-types)
(catch 'done
;; Scan until the semi colon.
(let ((token (opascal-next-token at-token))
(token-kind nil)
(limit (opascal-token-start limit-token)))
(while (and token (<= (opascal-token-start token) limit))
(setq token-kind (opascal-token-kind token))
(cond
;; A semicolon delimits the search.
((eq 'semicolon token-kind) (throw 'done token))
;; Skip over the inheritance list.
((eq 'open-group token-kind) (setq token (opascal-group-end token)))
;; Only allow "of" and whitespace, and an identifier
((memq token-kind `(of word ,@opascal-whitespace)))
;; Otherwise we are not in a simple class declaration.
((throw 'done nil)))
(setq token (opascal-next-token token)))))))