Next: , Previous: Base Arguments, Up: Template Argument Dictionary Entries

6.7.2 Semantic Arguments Argument :tag

The :tag argument is filled in with information from Semantic. The tag in question is queried from the senator tag ring, or passed in from SRecode utilities that use tags in templates.

This is a compound value for the tag in the current senator kill ring, or something handled via the variable srecode-semantic-selected-tag.
— Variable: srecode-semantic-selected-tag

The tag selected by a :tag template argument. If this is nil, then senator-tag-ring is used.

Use the function part of a macro insert to extract obscure parts of the tag.

The name of the tag as a string.
The data type of the tag as a string.

If tag is a function, you will get these additional dictionary entries.

A Loop macro value. Each argument is inserted in ARGS. To create a comma separated list of arguments, you might do this:
          {{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}}

Within the section dictionaries for each argument, you will find both NAME and TYPE, in addition to the automatic section values for FIRST, LAST, NOTFIRST, and NOTLAST.

The string name of the parent of this function, if the function is a method of some class.
In each THROWS entry, the NAME of the signal thrown is specified.

If tag is a variable, you will get these dictionary entries.

Enabled if there is a VALUE.
An entry in the HAVEDEFAULT subdictionary that represents the textual representation of the default value of this variable.

If tag is a datatype, you will get these dictionary entries.

Section dictionaries for the parents of this class. Each parent will have a NAME.
Section dictionaries for all the implemented interfaces of this class. Each interface will have a NAME.

Note that data type templates should always have a {{^}} macro in it where the core contents of that type will go. This is why data types don't have subdictionaries full of the slots in the classes or structs.