13 #define TREE_KIND(ID, NAME, TAGS) [ID] = (TAGS), 
   21     return kTreeTags[kind] & tags;
 
   35 static const char *tree_kind_string(
const tree_t *tree)
 
   44     CTASSERTF(
tree_has_tag(tree, eTagQual), 
"tree type %s does not have qualifiers", tree_kind_string(tree));
 
   46     tree->
quals = qualifiers;
 
   52     CTASSERTF(
tree_has_tag(tree, eTagQual), 
"tree type %s does not have qualifiers", tree_kind_string(tree));
 
   60     CTASSERTF(
tree_has_tag(tree, eTagStorage), 
"tree type %s does not have storage", tree_kind_string(tree));
 
   72     CTASSERTF(
tree_has_tag(tree, eTagStorage), 
"tree type %s does not have storage", tree_kind_string(tree));
 
   80     CTASSERTF(
tree_has_tag(tree, eTagEval), 
"tree type %s does not have an evaluation model", tree_kind_string(tree));
 
   88     CTASSERTF(
tree_has_tag(tree, eTagEval), 
"tree type %s does not have an evaluation model", tree_kind_string(tree));
 
  104     CTASSERTF(
tree_has_tag(tree, eTagName), 
"tree type %s does not have a name", tree_kind_string(tree));
 
  114     CTASSERTF(
tree_has_tag(tree, eTagName), 
"tree type %s does not have a symbol", tree_kind_string(tree));
 
  124     CTASSERTF(
tree_has_tag(tree, eTagName), 
"tree type %s does not have a name", tree_kind_string(tree));
 
  126     if (
tree_is(tree, eTreeError)) 
return false;
 
  128     return tree->
name == NULL;
 
  134     CTASSERTF(
tree_has_tag(tree, eTagHasType), 
"tree type %s does not have a type", tree_kind_string(tree));
 
  135     CTASSERTF(tree->
type != NULL, 
"tree type %s has not been set", tree_kind_string(tree));
 
  137     if (
tree_is(tree, eTreeError)) 
return tree;
 
  152     CTASSERTF(
tree_has_tag(
self, eTagHasType), 
"tree type %s does not have a type", tree_kind_string(
self));
 
CT_PUREFN CT_TREE_API bool tree_is(const tree_t *self, tree_kind_t kind)
 
CT_TREE_API const char * tree_to_string(const tree_t *self)
 
CT_BEGIN_API CT_TREE_API const char * tree_kind_to_string(tree_kind_t kind)
 
#define STA_DECL
sal2 annotation on function implementations to copy annotations from the declaration
 
#define CTASSERT(expr)
assert a condition, prints the condition as a message
 
#define CTASSERTF(expr,...)
assert a condition with a message and optional format arguments
 
tree_quals_t
all type qualifiers
 
eval_model_t
tree evaluation model
 
tree_kind_t
all tree node types
 
void tree_set_type(tree_t *self, const tree_t *type)
 
a position in a source file
 
const tree_t * storage
the underlying storage type
 
const char * name
the name of the declaration
 
STA_DECL tree_storage_t tree_get_storage(const tree_t *tree)
 
STA_DECL eval_model_t tree_get_eval(const tree_t *tree)
 
STA_DECL const tree_t * tree_get_type(const tree_t *tree)
 
STA_DECL const node_t * tree_get_node(const tree_t *tree)
 
STA_DECL const char * tree_get_name(const tree_t *tree)
 
STA_DECL tree_quals_t tree_get_qualifiers(const tree_t *tree)
 
STA_DECL void tree_set_storage(tree_t *tree, tree_storage_t storage)
 
STA_DECL void tree_set_qualifiers(tree_t *tree, tree_quals_t qualifiers)
 
STA_DECL void tree_set_eval(tree_t *tree, eval_model_t model)
 
STA_DECL bool tree_is_symbol_anonymous(const tree_t *tree)
 
STA_DECL const char * tree_get_user_name(const tree_t *tree)
 
bool kind_has_tag(tree_kind_t kind, tree_tags_t tags)
 
STA_DECL tree_kind_t tree_get_kind(const tree_t *tree)
 
bool tree_has_tag(const tree_t *tree, tree_tags_t tags)