Skip to content

Commit

Permalink
Fixed C++17-namespace assignment bug
Browse files Browse the repository at this point in the history
Added scope save and restore before and after namespace parsing
  • Loading branch information
mrhatch97 committed May 9, 2019
1 parent 80bcb70 commit 7884402
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -3941,6 +3941,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
else
{
current->endBodyLine = yyLineNr;
Entry * original_root = current_root; // save root this namespace is in
if (current->section == Entry::NAMESPACE_SEC && current->type == "namespace")
{
int split_point;
Expand Down Expand Up @@ -4005,6 +4006,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
)
{ // namespaces and interfaces and java classes ends with a closing bracket without semicolon
current->reset();
current_root = original_root; // restore scope from before namespace descent
initEntry();
memspecEntry = 0;
BEGIN( FindMembers ) ;
Expand Down

0 comments on commit 7884402

Please sign in to comment.