void cxxScopePush( CXXToken * t, enum CXXScopeType eScopeType, enum CXXScopeAccess eInitialAccess ) { CXX_DEBUG_ASSERT( t->eType == CXXTokenTypeIdentifier, "The scope name must be an identifer" ); CXX_DEBUG_ASSERT( t->pszWord, "The scope name should have a text" ); cxxTokenChainAppend(g_pScope,t); t->uInternalScopeType = (unsigned char)eScopeType; t->uInternalScopeAccess = (unsigned char)eInitialAccess; g_bScopeNameDirty = true; #ifdef CXX_DO_DEBUGGING const char * szScopeName = cxxScopeGetFullName(); CXX_DEBUG_PRINT("Pushed scope: '%s'",szScopeName ? szScopeName : ""); #endif }
tagEntryInfo * cxxTagBegin(enum CXXTagKind eKindId,CXXToken * pToken) { if(!g_aCXXKinds[eKindId].enabled) { //CXX_DEBUG_PRINT("Tag kind %s is not enabled",g_aCXXKinds[eKindId].name); return NULL; } initTagEntry( &g_oCXXTag, vStringValue(pToken->pszWord), &(g_aCXXKinds[eKindId]) ); g_oCXXTag.lineNumber = pToken->iLineNumber; g_oCXXTag.filePosition = pToken->oFilePosition; g_oCXXTag.isFileScope = FALSE; if(!cxxScopeIsGlobal()) { g_oCXXTag.extensionFields.scopeKind = &g_aCXXKinds[cxxScopeGetKind()]; g_oCXXTag.extensionFields.scopeName = cxxScopeGetFullName(); } // FIXME: meaning of "is file scope" is quite debatable... g_oCXXTag.extensionFields.access = g_aCXXAccessStrings[cxxScopeGetAccess()]; return &g_oCXXTag; }
void cxxScopePop(void) { CXX_DEBUG_ASSERT( g_pScope->iCount > 0, "When popping as scope there must be a scope to pop" ); cxxTokenDestroy(cxxTokenChainTakeLast(g_pScope)); g_bScopeNameDirty = true; #ifdef CXX_DO_DEBUGGING const char * szScopeName = cxxScopeGetFullName(); CXX_DEBUG_PRINT("Popped scope: '%s'",szScopeName ? szScopeName : ""); #endif }
void cxxScopePushTop(CXXToken * t) { CXX_DEBUG_ASSERT( t->eType == CXXTokenTypeIdentifier, "The scope name must be an identifier" ); CXX_DEBUG_ASSERT( t->pszWord, "The scope name should have a text" ); cxxTokenChainAppend(g_pScope,t); g_bScopeNameDirty = true; #ifdef CXX_DO_DEBUGGING const char * szScopeName = cxxScopeGetFullName(); CXX_DEBUG_PRINT("Pushed scope: '%s'",szScopeName ? szScopeName : ""); #endif }
static void qtMocMakeTagForProperty (CXXToken * pToken, const char *pszType) { tagEntryInfo tag; initTagEntry(&tag, vStringValue(pToken->pszWord), K_PROPERTY); tag.lineNumber = pToken->iLineNumber; tag.filePosition = pToken->oFilePosition; tag.isFileScope = false; if(!cxxScopeIsGlobal()) { tag.extensionFields.scopeLangType = getNamedLanguage ("C++", 0); /* ??? */ tag.extensionFields.scopeKindIndex = cxxScopeGetKind(); tag.extensionFields.scopeName = cxxScopeGetFullName(); } tag.extensionFields.typeRef[0] = "typename"; tag.extensionFields.typeRef[1] = pszType; makeTagEntry(&tag); }