Fix function call parameter printer to omit extraneous leading comma
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 14 May 2010 23:06:41 +0000 (16:06 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 14 May 2010 23:07:04 +0000 (16:07 -0700)
The output of all test cases was verified to be the same using diff.

glsl_parser_extras.cpp

index 985d382..62eeb9c 100644 (file)
@@ -326,7 +326,8 @@ ast_expression::print(void) const
       printf("( ");
 
       foreach_list_const (n, &this->expressions) {
-        printf(", ");
+        if (n != this->expressions.get_head())
+           printf(", ");
 
         ast_node *ast = exec_node_data(ast_node, n, link);
         ast->print();