This commit is contained in:
Enrico Tröger 2015-04-19 16:09:09 +02:00
parent e3ef006d59
commit 26a417d04d

View File

@ -238,7 +238,7 @@ static struct {
} CurrentStatement;
/* Current namespace */
static vString *CurrentNamesapce;
static vString *CurrentNamespace;
static void buildPhpKeywordHash (const langType language)
@ -289,9 +289,9 @@ static void initPhpEntry (tagEntryInfo *const e, const tokenInfo *const token,
else
vStringClear (fullScope);
if (vStringLength (CurrentNamesapce) > 0)
if (vStringLength (CurrentNamespace) > 0)
{
vStringCopy (fullScope, CurrentNamesapce);
vStringCopy (fullScope, CurrentNamespace);
parentKind = K_NAMESPACE;
}
@ -1352,7 +1352,7 @@ static boolean parseNamespace (tokenInfo *const token)
{
tokenInfo *nsToken = newToken ();
vStringClear (CurrentNamesapce);
vStringClear (CurrentNamespace);
copyToken (nsToken, token, FALSE);
do
@ -1360,18 +1360,18 @@ static boolean parseNamespace (tokenInfo *const token)
readToken (token);
if (token->type == TOKEN_IDENTIFIER)
{
if (vStringLength (CurrentNamesapce) > 0)
vStringPut (CurrentNamesapce, '\\');
vStringCat (CurrentNamesapce, token->string);
if (vStringLength (CurrentNamespace) > 0)
vStringPut (CurrentNamespace, '\\');
vStringCat (CurrentNamespace, token->string);
}
}
while (token->type != TOKEN_EOF &&
token->type != TOKEN_SEMICOLON &&
token->type != TOKEN_OPEN_CURLY);
vStringTerminate (CurrentNamesapce);
if (vStringLength (CurrentNamesapce) > 0)
makeNamespacePhpTag (nsToken, CurrentNamesapce);
vStringTerminate (CurrentNamespace);
if (vStringLength (CurrentNamespace) > 0)
makeNamespacePhpTag (nsToken, CurrentNamespace);
if (token->type == TOKEN_OPEN_CURLY)
enterScope (token, NULL, -1);
@ -1453,7 +1453,7 @@ static void findTags (void)
CurrentStatement.access = ACCESS_UNDEFINED;
CurrentStatement.impl = IMPL_UNDEFINED;
CurrentNamesapce = vStringNew ();
CurrentNamespace = vStringNew ();
do
{
@ -1461,7 +1461,7 @@ static void findTags (void)
}
while (token->type != TOKEN_EOF); /* keep going even with unmatched braces */
vStringDelete (CurrentNamesapce);
vStringDelete (CurrentNamespace);
deleteToken (token);
}