Function: semantic-c-evaluate-symbol-for-hideif
semantic-c-evaluate-symbol-for-hideif is an interactive and
byte-compiled function defined in c.el.gz.
Signature
(semantic-c-evaluate-symbol-for-hideif SPP-SYMBOL)
Documentation
Lookup the symbol SPP-SYMBOL (a string) to something hideif can use.
Pull out the symbol list, and call
semantic-c-convert-spp-value-to-hideif-value.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/bovine/c.el.gz
(defun semantic-c-evaluate-symbol-for-hideif (spp-symbol)
"Lookup the symbol SPP-SYMBOL (a string) to something hideif can use.
Pull out the symbol list, and call
`semantic-c-convert-spp-value-to-hideif-value'."
(interactive "sSymbol name: ")
(when (symbolp spp-symbol) (setq spp-symbol (symbol-name spp-symbol)))
(if (semantic-lex-spp-symbol-p spp-symbol )
;; Convert the symbol into a stream of tokens from the macro which we
;; can then interpret.
(let ((stream (semantic-lex-spp-symbol-stream spp-symbol)))
(cond
;; Empty string means defined, so t.
((null stream) t)
;; A list means a parsed macro stream.
((listp stream)
;; Convert the macro to something we can return.
(semantic-c-convert-spp-value-to-hideif-value spp-symbol stream))
;; Strings might need to be turned into numbers
((stringp stream)
(if (string-match "^[0-9]+L?$" stream)
;; If it matches a number expression, then convert to a
;; number.
(string-to-number stream)
stream))
;; Just return the stream. A user might have just stuck some
;; value in it directly.
(t stream)
))
;; Else, store an error, return nil.
(progn
(semantic-push-parser-warning
(format "SPP Symbol %s not available" spp-symbol)
(point) (point))
nil)))