cpp: Fixed issue with Alt+C after typedef #1313

git-svn-id: svn://ultimatepp.org/upp/trunk@9097 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-10-28 08:14:59 +00:00
parent 68a9173726
commit b121df5ed5

View file

@ -1716,6 +1716,7 @@ void Parser::Do()
if(q >= 0) { // class variable definition like: int Ctrl::EventLoop;
ScopeCat(scope, d.name.Mid(0, q));
current_scope = scope; // temporary until ';'
LOG("Decl " << current_scope);
name = d.name.Mid(q + 2);
member_type = CLASSVARIABLE;
}
@ -1745,8 +1746,7 @@ void Parser::Do()
lex.FinishStatCollection(), maxScopeDepth));
lex.StartStatCollection(); // start collection of orphan symbols
}
Key(';');
if(lex != t_eof)
if(Key(';'))
SetScopeCurrent(); // need to be after ';' to make class variable definitions work
}
}