Function: semantic-lex-comments
semantic-lex-comments is a byte-compiled function defined in
lex.el.gz.
Signature
(semantic-lex-comments)
Documentation
Detect and create a comment token.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/lex.el.gz
(define-lex-regex-analyzer semantic-lex-comments
"Detect and create a comment token."
semantic-lex-comment-regex
(save-excursion
(forward-comment 1)
;; Generate newline token if enabled
(if (bolp) (backward-char 1))
(setq semantic-lex-end-point (point))
;; Language wants comments or want them as whitespaces,
;; link them together.
(if (eq (semantic-lex-token-class (car semantic-lex-token-stream)) 'comment)
(setcdr (semantic-lex-token-bounds (car semantic-lex-token-stream))
semantic-lex-end-point)
(semantic-lex-push-token
(semantic-lex-token
'comment (match-beginning 0) semantic-lex-end-point)))))