Function: semantic-analyze-scoped-tags-default

semantic-analyze-scoped-tags-default is a byte-compiled function defined in scope.el.gz.

Signature

(semantic-analyze-scoped-tags-default TYPELIST HALFSCOPE)

Documentation

Return accessible tags when TYPELIST and HALFSCOPE is in scope.

HALFSCOPE is the current scope partially initialized. Tags returned are not in the global name space, but are instead scoped inside a class or namespace. Such items can be referenced without use of "object.function()" style syntax due to an implicit "object".

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/scope.el.gz
(defun semantic-analyze-scoped-tags-default (typelist halfscope)
  "Return accessible tags when TYPELIST and HALFSCOPE is in scope.
HALFSCOPE is the current scope partially initialized.
Tags returned are not in the global name space, but are instead
scoped inside a class or namespace.  Such items can be referenced
without use of \"object.function()\" style syntax due to an
implicit \"object\"."
  (let ((typelist2 nil)
	(currentscope nil)
	(parentlist (oref halfscope parents))
	(miniscope halfscope)
	)
    ;; Loop over typelist, and find and merge all namespaces matching
    ;; the names in typelist.
    (while typelist
      (let ((tt (semantic-tag-type (car typelist))))
	(when (and (stringp tt) (string= tt "namespace"))
	  ;; By using the typecache, our namespaces are pre-merged.
	  (setq typelist2 (cons (car typelist) typelist2))
	  ))
      (setq typelist (cdr typelist)))

    ;; Loop over the types (which should be sorted by position)
    ;; adding to the scopelist as we go, and using the scopelist
    ;; for additional searching!
    (while typelist2
      (oset miniscope scope currentscope)
      (oset miniscope fullscope currentscope)
      (setq currentscope (append
			  (semantic-analyze-scoped-type-parts (car typelist2)
							      miniscope)
			  currentscope))
      (setq typelist2 (cdr typelist2)))

    ;; Collect all the types (class, etc) that are in our heritage.
    ;; These are types that we can extract members from, not those
    ;; declared in using statements, or the like.
    ;; Get the PARENTS including nesting scope for this location.
    (while parentlist
      (oset miniscope scope currentscope)
      (oset miniscope fullscope currentscope)
      (setq currentscope (append
			  (semantic-analyze-scoped-type-parts (car parentlist)
							      miniscope)
			  currentscope))
      (setq parentlist (cdr parentlist)))

    ;; Loop over all the items, and collect any type constants.
    (let ((constants nil))
      (dolist (T currentscope)
	(setq constants (append constants
				(semantic-analyze-type-constants T)))
	)

      (setq currentscope (append currentscope constants)))

    currentscope))