From b121df5ed5e28effd374deb4142aec98239e9999 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 28 Oct 2015 08:14:59 +0000 Subject: [PATCH] cpp: Fixed issue with Alt+C after typedef #1313 git-svn-id: svn://ultimatepp.org/upp/trunk@9097 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CppBase/Parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uppsrc/CppBase/Parser.cpp b/uppsrc/CppBase/Parser.cpp index e5e8f6689..3cb38c0f5 100644 --- a/uppsrc/CppBase/Parser.cpp +++ b/uppsrc/CppBase/Parser.cpp @@ -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 } }