Initial pass at resolving function calls
[mesa.git] / glsl_parser.ypp
index c755725458112335aaae221486995c368228f689..058a03231dace870ed07d984a7133dfb25b73a9c 100644 (file)
@@ -337,33 +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
        {
-          ast_expression *expr =
-             new ast_expression(ast_identifier, NULL, NULL, NULL);
-          expr->primary_expression.identifier = $1;
-
-          $$ = (struct ast_node *) expr;
+          ast_expression *callee = new ast_expression($1);
+          $$ = new ast_function_expression(callee);
        }
        | FIELD_SELECTION
        {
-          ast_expression *expr =
-             new ast_expression(ast_identifier, NULL, NULL, NULL);
-          expr->primary_expression.identifier = $1;
-
-          $$ = (struct ast_node *) expr;
+          ast_expression *callee = new ast_expression($1);
+          $$ = new ast_function_expression(callee);
        }
        ;