Function: hif-parse-macro-arglist
hif-parse-macro-arglist is a byte-compiled function defined in
hideif.el.gz.
Signature
(hif-parse-macro-arglist STR)
Documentation
Parse argument list formatted as ( arg1 [ , argn] [...] ).
The ... is also included. Return a list of the arguments, if ... exists the
first arg will be hif-etc.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/hideif.el.gz
(defun hif-parse-macro-arglist (str)
"Parse argument list formatted as `( arg1 [ , argn] [...] )'.
The `...' is also included. Return a list of the arguments, if `...' exists the
first arg will be `hif-etc'."
(let* ((hif-simple-token-only nil) ; Dynamic binding var for `hif-tokenize'
(tokenlist
(cdr (hif-tokenize
(- (point) (length str)) (point)))) ; Remove `hif-lparen'
etc result token)
(while (not (eq (setq token (pop tokenlist)) 'hif-rparen))
(cond
((eq token 'hif-etc)
(setq etc t))
((eq token 'hif-comma)
t)
(t
(push token result))))
(if etc
(cons 'hif-etc (nreverse result))
(nreverse result))))