Variable: semantic-lex-comments-as-whitespace
semantic-lex-comments-as-whitespace is a variable defined in
lex.el.gz.
Value
((looking-at semantic-lex-comment-regex)
(save-excursion
(forward-comment 1)
(if
(bolp)
(backward-char 1))
(setq semantic-lex-end-point
(point))
(if
(eq
(semantic-lex-token-class
(car semantic-lex-token-stream))
'whitespace)
(setcdr
(semantic-lex-token-bounds
(car semantic-lex-token-stream))
semantic-lex-end-point)
(semantic-lex-push-token
(semantic-lex-token 'whitespace
(match-beginning 0)
semantic-lex-end-point)))))
Documentation
Detect comments and create a whitespace token.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/lex.el.gz
(define-lex-regex-analyzer semantic-lex-comments-as-whitespace
"Detect comments and create a whitespace 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)) 'whitespace)
(setcdr (semantic-lex-token-bounds (car semantic-lex-token-stream))
semantic-lex-end-point)
(semantic-lex-push-token
(semantic-lex-token
'whitespace (match-beginning 0) semantic-lex-end-point)))))