Function: antlr-syntax-propertize-wholerule

antlr-syntax-propertize-wholerule is a byte-compiled function defined in antlr-mode.el.gz.

Signature

(antlr-syntax-propertize-wholerule START END)

Documentation

Function used to properly highlight ANTLR v4 charsets.

This function is used in syntax-propertize-extend-region-functions to make sure that the propertized region starts at the beginning of a rule.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/antlr-mode.el.gz
(defun antlr-syntax-propertize-wholerule (start end)
  ;; checkdoc-params: (start end)
  "Function used to properly highlight ANTLR v4 charsets.
This function is used in `syntax-propertize-extend-region-functions' to
make sure that the propertized region starts at the beginning of a rule."
  (goto-char start)
  (beginning-of-line)
  (while (if (bobp) nil (looking-at "[ \t\n}]\\|@init\\_>\\|options\\_>"))
    (beginning-of-line 0))
  ;; no need to find the real end of a rule... end-of-line is good
  (cons (point)
        (progn (goto-char end)
               (if (bolp) (point) (line-beginning-position 2)))))