@@ -489,13 +489,17 @@ struct action<char_type>
489
489
{
490
490
case Context::CHAR:
491
491
state[" type" ] = " char" ;
492
+ break ;
492
493
case Context::UINT8:
493
494
state[" type" ] = " uint8" ;
495
+ break ;
494
496
case Context::INT8:
495
497
state[" type" ] = " int8" ;
498
+ break ;
496
499
default :
497
500
EPROSIMA_LOG_ERROR (IDLPARSER, " Invalid char type " << ctx->char_translation );
498
501
state[" type" ] = " char" ;
502
+ break ;
499
503
}
500
504
}
501
505
@@ -515,11 +519,14 @@ struct action<wide_char_type>
515
519
{
516
520
case Context::WCHAR_T:
517
521
state[" type" ] = " wchar" ;
522
+ break ;
518
523
case Context::CHAR16_T:
519
524
state[" type" ] = " char16" ;
525
+ break ;
520
526
default :
521
527
EPROSIMA_LOG_ERROR (IDLPARSER, " Invalid wchar type " << ctx->char_translation );
522
528
state[" type" ] = " wchar" ;
529
+ break ;
523
530
}
524
531
}
525
532
@@ -1409,10 +1416,11 @@ struct action<typedef_dcl>
1409
1416
DynamicType::_ref_type alias_type = ctx->get_type (state, state[" type" ]);
1410
1417
DynamicTypeBuilderFactory::_ref_type factory {DynamicTypeBuilderFactory::get_instance ()};
1411
1418
TypeDescriptor::_ref_type type_descriptor {traits<TypeDescriptor>::make_shared ()};
1419
+ type_descriptor->kind (TK_ALIAS);
1420
+ type_descriptor->name (alias_name);
1412
1421
if (sizes_str.empty ())
1413
1422
{
1414
- type_descriptor->kind (TK_ALIAS);
1415
- type_descriptor->name (alias_name);
1423
+ type_descriptor->base_type (alias_type);
1416
1424
}
1417
1425
else
1418
1426
{
@@ -1421,9 +1429,8 @@ struct action<typedef_dcl>
1421
1429
{
1422
1430
sizes.push_back (static_cast <uint32_t >(std::stoul (size)));
1423
1431
}
1424
- type_descriptor->kind (TK_ARRAY);
1425
- type_descriptor->element_type (alias_type);
1426
- type_descriptor->bound (sizes);
1432
+ DynamicTypeBuilder::_ref_type array_builder {factory->create_array_type (alias_type, sizes)};
1433
+ type_descriptor->base_type (array_builder->build ());
1427
1434
}
1428
1435
1429
1436
DynamicTypeBuilder::_ref_type builder {factory->create_type (type_descriptor)};
0 commit comments