Next: , Previous: Tag Overlay Internals, Up: Tag Internals


1.7.4 Creating Tags

— Function: semantic-tag name class &rest attributes

Create a generic semantic tag. name is a string representing the name of this tag. class is the symbol that represents the class of tag this is, such as 'variable, or 'function. attributes is a list of additional attributes belonging to this tag.

     
     
Compatibility: semantic-tag introduced in semantic version 2.0 supercedes semantic-token which is now obsolete.

— Function: semantic-tag-new-variable name type default-value &rest attributes

Create a semantic tag of class 'variable. name is the name of this variable. type is a string or semantic tag representing the type of this variable. default-value is a string representing the default value of this variable. attributes is a list of additional attributes belonging to this tag.

     
     
Compatibility: semantic-tag-new-variable introduced in semantic version 2.0 supercedes semantic-token-new-variable which is now obsolete.

— Function: semantic-tag-new-function name type arg-list &rest attributes

Create a semantic tag of class 'function. name is the name of this function. type is a string or semantic tag representing the type of this function. arg-list is a list of strings or semantic tags representing the arguments of this function. attributes is a list of additional attributes belonging to this tag.

     
     
Compatibility: semantic-tag-new-function introduced in semantic version 2.0 supercedes semantic-token-new-function which is now obsolete.

— Function: semantic-tag-new-type name type members parents &rest attributes

Create a semantic tag of class 'type. name is the name of this type. type is a string or semantic tag representing the type of this type. members is a list of strings or semantic tags representing the elements that make up this type if it is a composite type. parents is a cons cell. (explicit-parents . interface-parents) explicit-parents can be a single string (Just one parent) or a list of parents (in a multiple inheritance situation). It can also be nil. interface-parents is a list of strings representing the names of all interfaces, or abstract classes inherited from. It can also be nil. This slot can be interesting because the form: ( nil “string”) is a valid parent where there is no explicit parent, and only an interface. attributes is a list of additional attributes belonging to this tag.

     
     
Compatibility: semantic-tag-new-type introduced in semantic version 2.0 supercedes semantic-token-new-type which is now obsolete.

— Function: semantic-tag-new-include name system-flag &rest attributes

Create a semantic tag of class 'include. name is the name of this include. system-flag represents that we were able to identify this include as belonging to the system, as opposed to belonging to the local project. attributes is a list of additional attributes belonging to this tag.

     
     
Compatibility: semantic-tag-new-include introduced in semantic version 2.0 supercedes semantic-token-new-include which is now obsolete.

— Function: semantic-tag-new-package name detail &rest attributes

Create a semantic tag of class 'package. name is the name of this package. detail is extra information about this package, such as a location where it can be found. attributes is a list of additional attributes belonging to this tag.

     
     
Compatibility: semantic-tag-new-package introduced in semantic version 2.0 supercedes semantic-token-new-package which is now obsolete.

— Function: semantic-tag-new-code name detail &rest attributes

Create a semantic tag of class 'code. name is a name for this code. detail is extra information about the code. attributes is a list of additional attributes belonging to this tag.