Changes in src/Parser/parser.yy [c38ae92:65d6de4]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rc38ae92 r65d6de4 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Nov 20 09:45:36201713 // Update Count : 29 4512 // Last Modified On : Fri Nov 17 11:38:57 2017 13 // Update Count : 2914 14 14 // 15 15 … … 114 114 } // for 115 115 } // distExt 116 117 // There is an ambiguity for inline generic-routine return-types and generic routines.118 // forall( otype T ) struct S { int i; } bar( T ) {}119 // Does the forall bind to the struct or the routine, and how would it be possible to explicitly specify the binding.120 // forall( otype T ) struct S { int T; } forall( otype W ) bar( W ) {}121 122 void rebindForall( DeclarationNode * declSpec, DeclarationNode * funcDecl ) {123 if ( declSpec->type->kind == TypeData::Aggregate ) { // return is aggregate definition124 funcDecl->type->forall = declSpec->type->aggregate.params; // move forall from aggregate to function type125 declSpec->type->aggregate.params = nullptr;126 } // if127 } // rebindForall128 116 129 117 bool forall = false; // aggregate have one or more forall qualifiers ? … … 2413 2401 | declaration_specifier function_declarator with_clause_opt compound_statement 2414 2402 { 2415 rebindForall( $1, $2 );2416 2403 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2417 2404 typedefTable.leaveScope(); … … 2440 2427 | declaration_specifier KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement 2441 2428 { 2442 rebindForall( $1, $2 );2443 2429 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2444 2430 typedefTable.leaveScope();
Note: See TracChangeset
for help on using the changeset viewer.