Changeset 0b0a285
- Timestamp:
- Jun 21, 2023, 2:38:44 AM (17 months ago)
- Branches:
- master
- Children:
- c84dd61
- Parents:
- fec8bd1
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rfec8bd1 r0b0a285 3848 3848 // { SemanticError( yylloc, "New array dimension is currently unimplemented." ); $$ = nullptr; } 3849 3849 | '[' push array_type_list pop ']' // CFA 3850 { SemanticError( yylloc, "Type array dimension is currently unimplemented." ); $$ = nullptr; }3850 { $$ = DeclarationNode::newArray( $3, nullptr, false ); } 3851 3851 | multi_array_dimension 3852 3852 ; -
src/Validate/GenericParameter.cpp
rfec8bd1 r0b0a285 247 247 const ast::Expr * TranslateDimensionCore::postvisit( 248 248 const ast::TypeExpr * expr ) { 249 // Does nothing, except prevents matching ast::Expr (above). 249 if ( auto instType = dynamic_cast<const ast::EnumInstType *>( expr->type.get() ) ) { 250 const ast::EnumDecl * baseEnum = instType->base.get(); 251 return ast::ConstantExpr::from_int( expr->location, baseEnum->members.size() ); 252 } 250 253 return expr; 251 254 }
Note: See TracChangeset
for help on using the changeset viewer.