Function: verilog-read-inst-param-value
verilog-read-inst-param-value is a byte-compiled function defined in
verilog-mode.el.gz.
Signature
(verilog-read-inst-param-value)
Documentation
Return list of parameters and values when point is inside instantiation.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
(defun verilog-read-inst-param-value ()
"Return list of parameters and values when point is inside instantiation."
(save-excursion
(verilog-read-inst-backward-name)
;; Skip over instantiation name
(verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_$]\\|)\\)" nil nil) ; ) isn't word boundary
;; If there are parameterized instantiations
(when (looking-at ")")
(let ((end-pt (point))
params
param-name paren-beg-pt param-value)
(verilog-backward-open-paren)
(while (verilog-re-search-forward-quick "\\." end-pt t)
(verilog-re-search-forward-quick "\\([a-zA-Z0-9`_$]\\)" nil nil)
(skip-chars-backward "a-zA-Z0-9'_$")
(looking-at "[a-zA-Z0-9`_$]+")
(setq param-name (buffer-substring-no-properties
(match-beginning 0) (match-end 0)))
(verilog-re-search-forward-quick "(" nil nil)
(setq paren-beg-pt (point))
(verilog-forward-close-paren)
(setq param-value (verilog-string-remove-spaces
(buffer-substring-no-properties
paren-beg-pt (1- (point)))))
(setq params (cons (list param-name param-value) params)))
params))))