17 STF_TAG
, // tag (struct/union/enum)
18 STF_TYPE
, // type information, NOT a typedef
20 STF_VARIABLE
, // variable, field or parameter
21 STF_PARAMETERS
, // function parameter list
22 // WARNING: Add strings to form_strtab in stree.c
23 // when adding constants here!
27 struct stree
*parent
, *prev
, *next
, *child
;
28 int id
; // unique id for debugging
29 struct sloc sloc
; // location of definition
37 struct stree
*st_node
;
38 struct stree_stack
*prev
, *next
;
41 struct stree
*stree_create(void);
42 void stree_append_child(struct stree
*st_parent
, struct stree
*st_child
);
43 void stree_remove_child(struct stree
*st_child
);
44 void stree_destroy(struct stree
*st
); // destroy tree recursively
45 void stree_next_child(struct stree
*st
, struct stree
**pchild
); // set *pchild to next child, or NULL at end
46 void stree_dump(struct cc
*cc
, struct stree
*st_root
, FILE *output
); // dump tree in a textual format
47 struct stree
*stree_right(struct stree
*st
); // return st's last child
48 int stree_child_count(struct stree
*st
); // return number of children that st has
51 struct stree
*stree_find_local(struct stree
*scope
, enum stree_form form
, tok_t tok
);
52 struct stree
*stree_get_child_by_form(struct stree
*st
, enum stree_form form
);