Function: semantic-lex-spp-stream-for-arglist
semantic-lex-spp-stream-for-arglist is a byte-compiled function
defined in lex-spp.el.gz.
Signature
(semantic-lex-spp-stream-for-arglist TOKEN)
Documentation
Lex up the contents of the arglist TOKEN.
Parsing starts inside the parens, and ends at the end of TOKEN.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/lex-spp.el.gz
(defun semantic-lex-spp-stream-for-arglist (token)
"Lex up the contents of the arglist TOKEN.
Parsing starts inside the parens, and ends at the end of TOKEN."
(let ((end (semantic-lex-token-end token))
(fresh-toks nil)
(toks nil))
(save-excursion
(if (stringp (nth 1 token))
;; If the 2nd part of the token is a string, then we have
;; a token specifically extracted from a buffer. Possibly
;; a different buffer. This means we need to do something
;; nice to parse its contents.
(let ((txt (semantic-lex-token-text token)))
(semantic-lex-spp-lex-text-string
(substring txt 1 (1- (length txt)))))
;; This part is like the original
(goto-char (semantic-lex-token-start token))
;; A cheat for going into the semantic list.
(forward-char 1)
(setq fresh-toks (semantic-lex-spp-stream-for-macro (1- end)))
(dolist (tok fresh-toks)
;; march 2011: This is too restrictive! For example "void"
;; can't get through. What elements was I trying to expunge
;; to put this in here in the first place? If I comment it
;; out, does anything new break?
;(when (memq (semantic-lex-token-class tok) '(symbol semantic-list))
;; It appears the commas need to be dumped. perhaps this is better,
;; but will it cause more problems later?
(unless (eq (semantic-lex-token-class tok) 'punctuation)
(setq toks (cons tok toks))))
(nreverse toks)))))