const char *interpolation_string() const;
};
+class ast_declarator_list;
+
class ast_struct_specifier : public ast_node {
public:
- ast_struct_specifier(const char *identifier, ast_node *declarator_list);
+ ast_struct_specifier(const char *identifier,
+ ast_declarator_list *declarator_list);
virtual void print(void) const;
virtual ir_rvalue *hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
const char *name;
+ /* List of ast_declarator_list * */
exec_list declarations;
};
%type <node> declaration_statement
%type <node> jump_statement
%type <struct_specifier> struct_specifier
-%type <node> struct_declaration_list
+%type <declarator_list> struct_declaration_list
%type <declarator_list> struct_declaration
%type <declaration> struct_declarator
%type <declaration> struct_declarator_list
struct_declaration_list:
struct_declaration
{
- $$ = (ast_node *) $1;
+ $$ = $1;
$1->link.self_link();
}
| struct_declaration_list struct_declaration
{
- $$ = (ast_node *) $1;
+ $$ = $1;
$$->link.insert_before(& $2->link);
}
;
ast_struct_specifier::ast_struct_specifier(const char *identifier,
- ast_node *declarator_list)
+ ast_declarator_list *declarator_list)
{
if (identifier == NULL) {
static unsigned anon_count = 1;