Add test for declaring variables of type void.
[mesa.git] / ast.h
diff --git a/ast.h b/ast.h
index 32cd5b6b4f5be2d7d657ed7662a63185ba21e408..5fd69695c1aff2d8c35e986f6922928d64df220f 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -357,6 +357,22 @@ class ast_type_specifier : public ast_node {
 public:
    ast_type_specifier(int specifier);
 
+   /** Construct a type specifier from a type name */
+   ast_type_specifier(const char *name) 
+      : type_specifier(ast_type_name), type_name(name), structure(NULL),
+       is_array(false), array_size(NULL), precision(ast_precision_high)
+   {
+      /* empty */
+   }
+
+   /** Construct a type specifier from a structure definition */
+   ast_type_specifier(ast_struct_specifier *s)
+      : type_specifier(ast_struct), type_name(s->name), structure(s),
+       is_array(false), array_size(NULL), precision(ast_precision_high)
+   {
+      /* empty */
+   }
+
    virtual void print(void) const;
 
    enum ast_types type_specifier;
@@ -515,6 +531,9 @@ public:
    ast_jump_statement(int mode, ast_expression *return_value);
    virtual void print(void) const;
 
+   virtual ir_instruction *hir(exec_list *instructions,
+                              struct _mesa_glsl_parse_state *state);
+
    enum ast_jump_modes {
       ast_continue,
       ast_break,