summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-06-29 19:27:50 -0700
committerMatt Turner <[email protected]>2013-07-11 20:58:59 -0700
commitae79e86d4c0d82b4102e2ec65c93c8240fd22e9d (patch)
tree680138963d2e10b66964d350efd8836c20bff596 /src/glsl/glsl_parser_extras.cpp
parent8d45caaebaa017e910ae985e005fadc6b626de7d (diff)
glsl: Add infrastructure for aggregate initializers.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index aa5a435fa95..602ec08328b 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -862,6 +862,19 @@ ast_expression::print(void) const
break;
}
+ case ast_aggregate: {
+ printf("{ ");
+ foreach_list_const(n, & this->expressions) {
+ if (n != this->expressions.get_head())
+ printf(", ");
+
+ ast_node *ast = exec_node_data(ast_node, n, link);
+ ast->print();
+ }
+ printf("} ");
+ break;
+ }
+
default:
assert(0);
break;