cppparser: Allow referencing enumerant within enum scope

This commit is contained in:
rdb 2023-08-02 11:06:32 +02:00
parent f7f3179a89
commit bc039a0476
2 changed files with 3194 additions and 3168 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2971,8 +2971,17 @@ base_specification:
;
enum:
enum_decl '{' enum_body '}'
enum_decl
{
if (current_enum->_scope != nullptr) {
push_scope(current_enum->_scope);
}
}
'{' enum_body '}'
{
if (current_enum->_scope != nullptr) {
pop_scope();
}
$$ = current_enum;
current_enum = nullptr;
}