summaryrefslogtreecommitdiff
path: root/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-05-10 10:47:14 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-05-10 11:04:02 -0700
commit3521f0bdd52d226031a3b60e2cd89b4629147690 (patch)
tree2215d03df7219358862025081aa018f0295184dd /glsl_parser_extras.cpp
parentbdd9b1f3ffa2a195d983816adfeca20480256119 (diff)
Store AST function call parameters in expressions
Previously the list of function call parameters was stored as a circular list in ast_expression::subexpressions[1]. They are now stored as a regular list in ast_expression::expressions.
Diffstat (limited to 'glsl_parser_extras.cpp')
-rw-r--r--glsl_parser_extras.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp
index 18280e0301..201b685189 100644
--- a/glsl_parser_extras.cpp
+++ b/glsl_parser_extras.cpp
@@ -330,19 +330,13 @@ ast_expression::print(void) const
break;
case ast_function_call: {
- ast_expression *parameters = subexpressions[1];
-
subexpressions[0]->print();
printf("( ");
- if (parameters != NULL) {
- struct simple_node *ptr;
-
- parameters->print();
- foreach (ptr, (struct simple_node *) parameters) {
- printf(", ");
- ((ast_node *)ptr)->print();
- }
+ struct simple_node *ptr;
+ foreach (ptr, &this->expressions) {
+ printf(", ");
+ ((ast_node *)ptr)->print();
}
printf(") ");