Changeset 777ed2b for src/Parser/parser.yy
- Timestamp:
- Jul 11, 2018, 11:55:59 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 0fc52b6
- Parents:
- fc20514 (diff), 7de22b28 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rfc20514 r777ed2b 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 11 11: 20:51201813 // Update Count : 373 812 // Last Modified On : Wed Jul 11 11:55:24 2018 13 // Update Count : 3739 14 14 // 15 15 … … 1825 1825 { $$ = DeclarationNode::newFromTypedef( $1 ); } 1826 1826 | '.' TYPEDEFname 1827 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }1827 { $$ = DeclarationNode::newQualifiedType( DeclarationNode::newFromGlobalScope(), DeclarationNode::newFromTypedef( $2 ) ); } 1828 1828 | type_name '.' TYPEDEFname 1829 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }1829 { $$ = DeclarationNode::newQualifiedType( $1, DeclarationNode::newFromTypedef( $3 ) ); } 1830 1830 | typegen_name 1831 1831 | '.' typegen_name 1832 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }1832 { $$ = DeclarationNode::newQualifiedType( DeclarationNode::newFromGlobalScope(), $2 ); } 1833 1833 | type_name '.' typegen_name 1834 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }1834 { $$ = DeclarationNode::newQualifiedType( $1, $3 ); } 1835 1835 ; 1836 1836 … … 1863 1863 { forall = false; } // reset 1864 1864 '{' field_declaration_list_opt '}' type_parameters_opt 1865 { $$ = DeclarationNode::newAggregate( $1, n ew string( DeclarationNode::anonymous.newName() ), $7, $5, true )->addQualifiers( $2 ); }1865 { $$ = DeclarationNode::newAggregate( $1, nullptr, $7, $5, true )->addQualifiers( $2 ); } 1866 1866 | aggregate_key attribute_list_opt no_attr_identifier fred 1867 1867 { … … 1873 1873 | aggregate_key attribute_list_opt type_name fred 1874 1874 { 1875 typedefTable.makeTypedef( *$3->type->symbolic.name, forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef 1875 // for type_name can be a qualified type name S.T, in which case only the last name in the chain needs a typedef (other names in the chain should already have one) 1876 typedefTable.makeTypedef( *$3->type->leafName(), forall | typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef 1876 1877 forall = false; // reset 1877 1878 } … … 1936 1937 { distExt( $3 ); $$ = distAttr( $2, $3 ); } // mark all fields in list 1937 1938 | typedef_declaration ';' // CFA 1938 { SemanticError( yylloc, "Typedef in aggregate is currently unimplemented." ); $$ = nullptr; }1939 1939 | cfa_field_declaring_list ';' // CFA, new style field declaration 1940 1940 | EXTENSION cfa_field_declaring_list ';' // GCC 1941 1941 { distExt( $2 ); $$ = $2; } // mark all fields in list 1942 1942 | cfa_typedef_declaration ';' // CFA 1943 { SemanticError( yylloc, "Typedef in aggregate is currently unimplemented." ); $$ = nullptr; }1944 1943 | static_assert // C11 1945 1944 ; … … 1990 1989 enum_type: // enum 1991 1990 ENUM attribute_list_opt '{' enumerator_list comma_opt '}' 1992 { $$ = DeclarationNode::newEnum( n ew string( DeclarationNode::anonymous.newName() ), $4, true )->addQualifiers( $2 ); }1991 { $$ = DeclarationNode::newEnum( nullptr, $4, true )->addQualifiers( $2 ); } 1993 1992 | ENUM attribute_list_opt no_attr_identifier 1994 1993 { typedefTable.makeTypedef( *$3 ); }
Note: See TracChangeset
for help on using the changeset viewer.