Initial pass at resolving function calls
[mesa.git] / glsl_parser.ypp
index debbcea9366cd21a42cf0494e5b8397986f3f3c6..058a03231dace870ed07d984a7133dfb25b73a9c 100644 (file)
@@ -337,25 +337,22 @@ function_call_header_with_parameters:
        // recognized through "type_specifier".
 function_call_header:
        function_identifier '('
-       {
-          $$ = new ast_expression(ast_function_call,
-                                  (struct ast_expression *) $1,
-                                  NULL, NULL);
-       }
        ;
 
 function_identifier:
        type_specifier
        {
-          $$ = (struct ast_node *) $1;
+          $$ = new ast_function_expression($1);
        }
        | IDENTIFIER
        {
-          $$ = new ast_expression($1);
+          ast_expression *callee = new ast_expression($1);
+          $$ = new ast_function_expression(callee);
        }
        | FIELD_SELECTION
        {
-          $$ = new ast_expression($1);
+          ast_expression *callee = new ast_expression($1);
+          $$ = new ast_function_expression(callee);
        }
        ;