Improvement to regain sync for certain cases of invalid C syntax. Fixes problem reported by Emil Rojas on 22 May 2002.

git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@167 c5d04d22-be80-434c-894e-aa346cc9e8e8
This commit is contained in:
darren 2002-07-10 05:36:54 +00:00
parent bffc498811
commit 5aad2feadc
2 changed files with 5 additions and 0 deletions

3
Test/static_array.c Normal file
View File

@ -0,0 +1,3 @@
/* Demonstrates temporary bug caused by statement reinitialization */
static wchar_t charset2uni[256] = {
};

2
c.c
View File

@ -1442,12 +1442,14 @@ static void processToken (tokenInfo *const token, statementInfo *const st)
case KEYWORD_EXTERN:
reinitStatement (st, FALSE);
st->scope = SCOPE_EXTERN;
st->declaration = DECL_BASE;
break;
case KEYWORD_STATIC:
reinitStatement (st, FALSE);
if (! isLanguage (Lang_java))
st->scope = SCOPE_STATIC;
st->declaration = DECL_BASE;
break;
}
}