diff options
author | Matt Turner <[email protected]> | 2013-06-26 15:53:12 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-07-11 20:58:59 -0700 |
commit | 8d45caaebaa017e910ae985e005fadc6b626de7d (patch) | |
tree | 387d04eec10a9d4e9ad5a0b6ed2d61af3e07b06f /src/glsl/ast.h | |
parent | 5df807b06f20d53063af9cfc5b4fc867f5fb810a (diff) |
glsl: Add an is_declaration field to ast_struct_specifier.
Will be used in a later commit to differentiate between a structure type
declaration and a variable declaration of a struct type. I.e., the
difference between
struct S { float x; }; (is_declaration = true)
and
S s; (is_declaration = false)
Also note that is_declaration = true for
struct S { float x; } s;
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r-- | src/glsl/ast.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 87f987682cd..8abea5225f0 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -460,7 +460,8 @@ public: * be modified. Zeros the inherited ast_node's fields. */ ast_struct_specifier(const ast_struct_specifier& that): - ast_node(), name(that.name), declarations(that.declarations) + ast_node(), name(that.name), declarations(that.declarations), + is_declaration(that.is_declaration) { /* empty */ } @@ -475,6 +476,7 @@ public: const char *name; /* List of ast_declarator_list * */ exec_list declarations; + bool is_declaration; }; |