Changeset 597ddfeb
- Timestamp:
- Apr 8, 2025, 11:06:36 PM (5 months ago)
- Branches:
- master
- Children:
- 2572add
- Parents:
- 9fbc40e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r9fbc40e r597ddfeb 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Mar 13 09:23:21202513 // Update Count : 725 512 // Last Modified On : Tue Apr 8 18:36:20 2025 13 // Update Count : 7259 14 14 // 15 15 … … 3118 3118 type_parameter: // CFA 3119 3119 type_class identifier_or_type_name 3120 { 3121 typedefTable.addToScope( *$2, TYPEDEFname, "type_parameter 1" ); 3122 if ( $1 == ast::TypeDecl::Otype ) { SemanticError( yylloc, "otype keyword is deprecated, use T " ); } 3123 if ( $1 == ast::TypeDecl::Dtype ) { SemanticError( yylloc, "dtype keyword is deprecated, use T &" ); } 3124 if ( $1 == ast::TypeDecl::Ttype ) { SemanticError( yylloc, "ttype keyword is deprecated, use T ..." ); } 3125 } 3120 { typedefTable.addToScope( *$2, TYPEDEFname, "type_parameter 1" ); } 3126 3121 type_initializer_opt assertion_list_opt 3127 3122 { $$ = DeclarationNode::newTypeParam( $1, $2 )->addTypeInitializer( $4 )->addAssertions( $5 ); } … … 3161 3156 type_class: // CFA 3162 3157 OTYPE 3163 { $$ = ast::TypeDecl::Otype; }3158 { SemanticError( yylloc, "otype keyword is deprecated, use T " ); } 3164 3159 | DTYPE 3165 { $$ = ast::TypeDecl::Dtype; }3160 { SemanticError( yylloc, "dtype keyword is deprecated, use T &" ); } 3166 3161 | FTYPE 3167 3162 { $$ = ast::TypeDecl::Ftype; } 3168 3163 | TTYPE 3169 { $$ = ast::TypeDecl::Ttype; }3164 { SemanticError( yylloc, "ttype keyword is deprecated, use T ..." ); } 3170 3165 ; 3171 3166 … … 3236 3231 $$ = DeclarationNode::newTrait( $2, $4, nullptr ); 3237 3232 } 3238 | forall TRAIT identifier_or_type_name '{' '}' // alternate3233 | forall TRAIT identifier_or_type_name '{' '}' // new alternate 3239 3234 { $$ = DeclarationNode::newTrait( $3, $1, nullptr ); } 3240 3235 | TRAIT identifier_or_type_name '(' type_parameter_list ')' '{' trait_declaration_list '}'
Note:
See TracChangeset
for help on using the changeset viewer.