Code::Blocks
SVN r11506
|
a symbol found in the parsed files, it can be many kinds, such as a variable, a class and so on. More...
#include <token.h>
Public Types | |
enum | Type { Undefined, OpenBrace, CloseBrace, Equal, String, Comma } |
Public Member Functions | |
Token (const wxString &name, unsigned int file, unsigned int line, size_t ticket) | |
constructor More... | |
~Token () | |
destructor More... | |
bool | AddChild (int childIdx) |
add a child token More... | |
bool | DeleteAllChildren () |
delete all the child tokens of the current token, not only remove the relation, but also delete the Token instance. More... | |
bool | HasChildren () const |
check if the token has any child tokens. More... | |
wxString | GetNamespace () const |
get a literal string presentation of the namespace. More... | |
bool | InheritsFrom (int idx) const |
check to see the current token is inherited from a specified token More... | |
wxString | DisplayName () const |
a short simple string to show the token information, this usually generate for show the tip message when the user hover a mouse over the text in C::B editor. More... | |
wxString | GetTokenKindString () const |
the token kind string, e.g. More... | |
wxString | GetTokenScopeString () const |
the access kind string, e.g. More... | |
wxString | GetFilename () const |
get a full path of the file which contains the current Token More... | |
wxString | GetImplFilename () const |
get a full path of the file which contains the function implementation. More... | |
wxString | GetFormattedArgs () const |
remove all ' ' in the original function argument string More... | |
wxString | GetStrippedArgs () const |
remove all default value of the function argument string, e.g. More... | |
size_t | GetTicket () const |
get the ticket value of the current token More... | |
bool | MatchesFiles (const TokenFileSet &files) |
see whether the current token belong to any files in the file set, both m_FileIdx and m_ImplFileIdx is considered More... | |
TokenTree * | GetTree () const |
get the TokenTree associated with the current Token More... | |
bool | IsValidAncestor (const wxString &ancestor) |
build in types are not valid ancestors for a type define token More... | |
Token () | |
Token (int start_, int end_, Type type_) | |
bool | operator== (Token const &t) const |
wxString | ExtractString (wxString const &s) const |
void | Trim (wxString const &s) |
Public Attributes | |
wxString | m_FullType |
this is the full return value (if any): e.g. More... | |
wxString | m_BaseType |
this is what the parser believes is the actual return value: e.g. More... | |
wxString | m_Name |
Token's name, it can be searched in the TokenTree. More... | |
wxString | m_Args |
If it is a function Token, then this value is function arguments, e.g. More... | |
wxString | m_BaseArgs |
stripped arguments e.g. More... | |
wxString | m_AncestorsString |
all ancestors comma-separated list, e.g. More... | |
unsigned int | m_FileIdx |
File index in TokenTree. More... | |
unsigned int | m_Line |
Line index where the token was met, which is 1 based. More... | |
wxString | m_Doc |
doxygen style comments More... | |
unsigned int | m_ImplFileIdx |
function implementation file index More... | |
unsigned int | m_ImplLine |
function implementation line index More... | |
unsigned int | m_ImplLineStart |
if token is impl, opening brace line More... | |
unsigned int | m_ImplLineEnd |
if token is impl, closing brace line More... | |
wxString | m_ImplDoc |
doxygen style comments in the Impl file More... | |
TokenScope | m_Scope |
public? private? protected? More... | |
TokenKind | m_TokenKind |
See TokenKind class. More... | |
bool | m_IsOperator |
is operator overload function? More... | |
bool | m_IsLocal |
if true, means the token belong to a C::B project, it exists in the project's source/header files, not from the system's headers or other include header files More... | |
bool | m_IsTemp |
local (automatic) variable More... | |
bool | m_IsConst |
the member method is const (yes/no) More... | |
bool | m_IsNoExcept |
the member method is noexcept (yes/no) More... | |
bool | m_IsAnonymous |
Is anonymous token? (e.g. More... | |
int | m_Index |
current Token index in the tree, it is index of the std::vector<Token*>, so use the index, we can first get a address of the Token, and after a dereference, we can get the Token instance. More... | |
int | m_ParentIndex |
Parent Token index. More... | |
TokenIdxSet | m_Children |
if it is a class kind token, then it contains all the member tokens More... | |
TokenIdxSet | m_Ancestors |
all the ancestors in the inheritance hierarchy More... | |
TokenIdxSet | m_DirectAncestors |
the nearest ancestors More... | |
TokenIdxSet | m_Descendants |
all the descendants in the inheritance hierarchy More... | |
wxArrayString | m_Aliases |
used for namespace aliases More... | |
wxString | m_TemplateArgument |
template argument list, comma separated list string More... | |
wxArrayString | m_TemplateType |
for a class template, this is the formal template argument list, but for a variable Token, this is the actual template arguments. More... | |
std::map< wxString, wxString > | m_TemplateMap |
a string to string map from formal template argument to actual template argument More... | |
wxString | m_TemplateAlias |
alias for templates, e.g. More... | |
void * | m_UserData |
custom user-data (the classbrowser expects it to be a pointer to a cbProject), this field is used when user can only show the tokens belong to the current C::B project in the browser tree. More... | |
int | start |
int | end |
Type | type |
bool | hasRepeatedChar |
Protected Attributes | |
TokenTree * | m_TokenTree |
a pointer to TokenTree More... | |
size_t | m_Ticket |
This is used in class browser to avoid duplication nodes in the class browser tree. More... | |
Friends | |
class | TokenTree |
a symbol found in the parsed files, it can be many kinds, such as a variable, a class and so on.
Once constructed, the Token should be always put in the TokenTree, and we can access the Token by TokenIndex.
enum Token::Type |
Enumerator | |
---|---|
Undefined | |
OpenBrace | |
CloseBrace | |
Equal | |
String | |
Comma |
Definition at line 20 of file parsewatchvalue.cpp.
Token::Token | ( | const wxString & | name, |
unsigned int | file, | ||
unsigned int | line, | ||
size_t | ticket | ||
) |
constructor
name | token's name, this can be a search key in the tokentree |
file | the index of the source file where the token locates |
ticket | an integer number, once a new Token is allocated, this value will increase by one, it is mainly used for duplicated Token checking when class browser tree get refreshed. |
Token::~Token | ( | ) |
|
inline |
Definition at line 30 of file parsewatchvalue.cpp.
Referenced by GetNextToken().
|
inline |
Definition at line 37 of file parsewatchvalue.cpp.
bool Token::AddChild | ( | int | childIdx | ) |
add a child token
childIdx | int |
Definition at line 267 of file token.cpp.
References m_Children.
Referenced by ParserThread::DoAddToken(), ParserThread::FindTokenFromQueue(), ParseCDBWatchValue(), and ParseGDBWatchValue().
bool Token::DeleteAllChildren | ( | ) |
delete all the child tokens of the current token, not only remove the relation, but also delete the Token instance.
Definition at line 275 of file token.cpp.
References TokenTree::erase(), m_Children, and m_TokenTree.
Referenced by NativeParserBase::RemoveLastFunctionChildren().
wxString Token::DisplayName | ( | ) | const |
a short simple string to show the token information, this usually generate for show the tip message when the user hover a mouse over the text in C::B editor.
Definition at line 80 of file token.cpp.
References _T, wxString::Find(), GetFormattedArgs(), GetNamespace(), GetStrippedArgs(), wxString::IsEmpty(), wxString::Last(), m_BaseArgs, m_FullType, m_Name, m_TemplateArgument, m_TokenKind, wxString::RemoveLast(), tkClass, tkEnum, tkEnumerator, tkMacroDef, tkNamespace, tkTypedef, and wxNOT_FOUND.
Referenced by CodeCompletion::DoAllMethodsImpl(), NativeParser::FindCurrentFunctionStart(), CodeCompletion::GetTokenAt(), NativeParserBase::GetTokenFromCurrentLine(), HasChildren(), CCDebugInfo::OnFindClick(), CodeCompletion::OnGotoDeclaration(), CodeCompletion::OnGotoFunction(), CCDebugInfo::OnSave(), ClassBrowser::OnSearch(), NativeParser::ParseLocalBlock(), and CCTreeCtrl::RemoveDoubles().
Definition at line 49 of file parsewatchvalue.cpp.
References end, wxString::length(), start, and wxString::substr().
Referenced by AddChild(), and ParseGDBWatchValue().
wxString Token::GetFilename | ( | ) | const |
get a full path of the file which contains the current Token
Definition at line 185 of file token.cpp.
References _T, TokenTree::GetFilename(), m_FileIdx, and m_TokenTree.
Referenced by NativeParserBase::GetTokenFromCurrentLine(), HasChildren(), DocumentationHelper::OnDocumentationLink(), CodeCompletion::OnGotoDeclaration(), ClassBrowser::OnJumpTo(), and ClassBrowser::OnTreeItemDoubleClick().
wxString Token::GetFormattedArgs | ( | ) | const |
remove all '
' in the original function argument string
Definition at line 199 of file token.cpp.
References _T, m_Args, wxString::Replace(), and wxEmptyString.
Referenced by ClassBrowserBuilderThread::AddNodes(), DisplayName(), CodeCompletion::DoCodeComplete(), InsertClassMethodDlgHelper::DoFillMethodsFor(), DocumentationHelper::GenerateHTML(), HasChildren(), CCDebugInfo::OnSave(), CodeCompletion::ParseFunctionsAndFillToolbar(), and NativeParserBase::PrettyPrintToken().
wxString Token::GetImplFilename | ( | ) | const |
get a full path of the file which contains the function implementation.
Note usually only function like token has this feature.
Definition at line 192 of file token.cpp.
References _T, TokenTree::GetFilename(), m_ImplFileIdx, and m_TokenTree.
Referenced by HasChildren(), DocumentationHelper::OnDocumentationLink(), CodeCompletion::OnGotoDeclaration(), ClassBrowser::OnJumpTo(), ClassBrowser::OnTreeItemDoubleClick(), and ClassBrowser::ShowMenu().
wxString Token::GetNamespace | ( | ) | const |
get a literal string presentation of the namespace.
Definition at line 253 of file token.cpp.
References _T, TokenTree::at(), ParserConsts::dcolon, m_Name, m_ParentIndex, m_TokenTree, and wxString::Prepend().
Referenced by DisplayName(), NativeParser::FindCurrentFunctionStart(), DocumentationHelper::GenerateHTML(), HasChildren(), CodeCompletion::OnGotoFunction(), ClassBrowser::OnSearch(), NativeParser::ParseBufferForUsingNamespace(), and CodeCompletion::ParseFunctionsAndFillToolbar().
wxString Token::GetStrippedArgs | ( | ) | const |
remove all default value of the function argument string, e.g.
if we have such argument "(int a = 10, float b = 3.14)" then we get "(int a, float b)"
Definition at line 206 of file token.cpp.
References _T, wxString::Alloc(), wxString::IsEmpty(), wxString::Last(), wxString::Len(), m_Args, wxString::Trim(), and wxEmptyString.
Referenced by DisplayName(), CodeCompletion::DoAllMethodsImpl(), DocumentationHelper::GenerateHTML(), and HasChildren().
|
inline |
get the ticket value of the current token
Definition at line 161 of file token.h.
References m_Ticket, and MatchesFiles().
Referenced by ClassBrowserBuilderThread::AddNodes(), and ClassBrowserBuilderThread::RemoveInvalidNodes().
wxString Token::GetTokenKindString | ( | ) | const |
the token kind string, e.g.
for a tkClass kind Token, we get a "class" string
Definition at line 311 of file token.cpp.
References _T, m_TokenKind, tkAnyContainer, tkAnyFunction, tkClass, tkConstructor, tkDestructor, tkEnum, tkEnumerator, tkFunction, tkMacroDef, tkMacroUse, tkNamespace, tkTypedef, tkUndefined, tkVariable, and wxEmptyString.
Referenced by ParserThread::DoAddToken(), DocumentationHelper::GenerateHTML(), NativeParserBase::GenerateResultSet(), HasChildren(), and CCDebugInfo::OnSave().
wxString Token::GetTokenScopeString | ( | ) | const |
the access kind string, e.g.
for a tsPrivate type Token, we get a "private" string
Definition at line 333 of file token.cpp.
References _T, m_Scope, tsPrivate, tsProtected, tsPublic, tsUndefined, and wxEmptyString.
Referenced by DocumentationHelper::GenerateHTML(), and HasChildren().
|
inline |
get the TokenTree associated with the current Token
Definition at line 173 of file token.h.
References IsValidAncestor(), and m_TokenTree.
Referenced by InsertClassMethodDlgHelper::DoFillMethodsFor(), and ClassBrowserBuilderThread::TokenContainsChildrenOfKind().
|
inline |
check if the token has any child tokens.
Definition at line 113 of file token.h.
References DisplayName(), GetFilename(), GetFormattedArgs(), GetImplFilename(), GetNamespace(), GetStrippedArgs(), GetTokenKindString(), GetTokenScopeString(), InheritsFrom(), and m_Children.
Referenced by NativeParserBase::FindCurrentFunctionScope().
bool Token::InheritsFrom | ( | int | idx | ) | const |
check to see the current token is inherited from a specified token
idx | the specified token |
Definition at line 289 of file token.cpp.
References TokenTree::at(), InheritsFrom(), m_DirectAncestors, and m_TokenTree.
Referenced by HasChildren(), and InheritsFrom().
bool Token::IsValidAncestor | ( | const wxString & | ancestor | ) |
build in types are not valid ancestors for a type define token
ancestor | testing type string |
Definition at line 133 of file token.cpp.
References _T, wxString::Len(), and wxString::StartsWith().
Referenced by DocumentationHelper::ConvertTypeToAnchor(), ParserThread::DoParse(), and GetTree().
bool Token::MatchesFiles | ( | const TokenFileSet & | files | ) |
see whether the current token belong to any files in the file set, both m_FileIdx and m_ImplFileIdx is considered
files | a file(index) set |
Definition at line 239 of file token.cpp.
References m_FileIdx, and m_ImplFileIdx.
Referenced by GetTicket().
|
inline |
Definition at line 45 of file parsewatchvalue.cpp.
|
inline |
Definition at line 55 of file parsewatchvalue.cpp.
References end, wxString::length(), start, and wxT.
Referenced by ParseGDBWatchValue().
int Token::end |
Definition at line 65 of file parsewatchvalue.cpp.
Referenced by ExtractString(), GetNextToken(), operator==(), ParseGDBWatchValue(), Trim(), and CodeCompletion::UpdateEditorSyntax().
bool Token::hasRepeatedChar |
Definition at line 67 of file parsewatchvalue.cpp.
Referenced by GetNextToken(), and ParseGDBWatchValue().
wxArrayString Token::m_Aliases |
used for namespace aliases
Definition at line 280 of file token.h.
Referenced by CodeCompletion::DoCodeComplete(), NativeParserBase::GenerateResultSet(), and ParserThread::HandleNamespace().
TokenIdxSet Token::m_Ancestors |
all the ancestors in the inheritance hierarchy
Definition at line 271 of file token.h.
Referenced by NativeParserBase::GenerateResultSet(), TokenTree::RecalcFullInheritance(), TokenTree::RecalcInheritanceChain(), TokenTree::RemoveToken(), and CodeCompletion::UpdateEditorSyntax().
wxString Token::m_AncestorsString |
all ancestors comma-separated list, e.g.
if a class declaration like below class AAA :public BBB, public CCC then the m_AncestorsString is "BBB,CCC", note that once m_Ancestors is constructed, this variable will be cleared.
Definition at line 204 of file token.h.
Referenced by TokenTree::AddTokenToList(), ParserThread::DoParse(), ParserThread::HandleClass(), ParserThread::ReadClsNames(), and TokenTree::RecalcInheritanceChain().
wxString Token::m_Args |
If it is a function Token, then this value is function arguments, e.g.
(int arg1 = 10, float arg2 = 9.0) If it is an enumerator, then this is the assigned (inferred) value
Definition at line 194 of file token.h.
Referenced by Tokenizer::AddMacroDefinition(), TokenTree::AddTokenToList(), ParserThread::CalcEnumExpression(), NativeParserBase::ComputeCallTip(), ParserThread::DoAddToken(), DocumentationHelper::GenerateHTML(), GetFormattedArgs(), Tokenizer::GetMacroExpandedText(), GetStrippedArgs(), CodeCompletion::OnGotoFunction(), NativeParser::ParseFunctionArguments(), and NativeParserBase::PrettyPrintToken().
wxString Token::m_BaseArgs |
stripped arguments e.g.
(int arg1, float arg2)
Definition at line 197 of file token.h.
Referenced by TokenTree::AddTokenToList(), DisplayName(), ParserThread::DoAddToken(), and TokenTree::TokenExists().
wxString Token::m_BaseType |
this is what the parser believes is the actual return value: e.g.
Definition at line 185 of file token.h.
Referenced by TokenTree::AddTokenToList(), NativeParserBase::ComputeCallTip(), ParserThread::DoAddToken(), ParserThread::DoParse(), NativeParserBase::FindAIMatches(), CodeCompletion::ParseFunctionsAndFillToolbar(), NativeParserBase::PrettyPrintToken(), NativeParserBase::ResolveExpression(), and NativeParserBase::ResolveOperator().
TokenIdxSet Token::m_Children |
if it is a class kind token, then it contains all the member tokens
Definition at line 268 of file token.h.
Referenced by AddChild(), ClassBrowserBuilderThread::AddChildrenOf(), NativeParserBase::AddChildrenOfEnum(), NativeParserBase::AddChildrenOfUnnamed(), NativeParserBase::AddConstructors(), TokenTree::CheckChildRemove(), NativeParserBase::ComputeCallTip(), DeleteAllChildren(), InsertClassMethodDlgHelper::DoFillMethodsFor(), NativeParserBase::FindAIMatches(), DocumentationHelper::GenerateHTML(), NativeParserBase::GenerateResultSet(), HasChildren(), NativeParserBase::IsChildOfUnnamedOrEnum(), TokenTree::RemoveToken(), ClassBrowserBuilderThread::TokenContainsChildrenOfKind(), ClassBrowserBuilderThread::TokenMatchesFilter(), and CodeCompletion::UpdateEditorSyntax().
TokenIdxSet Token::m_Descendants |
all the descendants in the inheritance hierarchy
Definition at line 277 of file token.h.
Referenced by ClassBrowserBuilderThread::AddDescendantsOf(), ClassBrowserBuilderThread::ExpandItem(), TokenTree::RecalcInheritanceChain(), and TokenTree::RemoveToken().
TokenIdxSet Token::m_DirectAncestors |
the nearest ancestors
Definition at line 274 of file token.h.
Referenced by ClassBrowserBuilderThread::AddAncestorsOf(), InsertClassMethodDlgHelper::DoFillMethodsFor(), ClassBrowserBuilderThread::ExpandItem(), InheritsFrom(), TokenTree::RecalcInheritanceChain(), and TokenTree::RemoveToken().
wxString Token::m_Doc |
doxygen style comments
Definition at line 213 of file token.h.
Referenced by TokenTree::AppendDocumentation(), TokenTree::GetDocumentation(), and TokenTree::RemoveFile().
unsigned int Token::m_FileIdx |
File index in TokenTree.
Definition at line 207 of file token.h.
Referenced by TokenTree::AddToken(), TokenTree::AppendDocumentation(), CCTreeCtrl::CBLineCompare(), TokenTree::CheckChildRemove(), ParserThread::DoAddToken(), GetFilename(), MatchesFiles(), and TokenTree::RemoveFile().
wxString Token::m_FullType |
this is the full return value (if any): e.g.
const wxString&
Definition at line 182 of file token.h.
Referenced by Tokenizer::AddMacroDefinition(), ClassBrowserBuilderThread::AddNodes(), TokenTree::AddTokenToList(), NativeParserBase::ComputeCallTip(), DisplayName(), ParserThread::DoAddToken(), CodeCompletion::DoAllMethodsImpl(), CodeCompletion::DoCodeComplete(), InsertClassMethodDlgHelper::DoFillMethodsFor(), ParserThread::DoParse(), DocumentationHelper::GenerateHTML(), Tokenizer::GetMacroExpandedText(), CodeCompletion::OnGotoFunction(), NativeParserBase::PrettyPrintToken(), ParserThread::ResolveTemplateArgs(), and ParserThread::ResolveTemplateMap().
wxString Token::m_ImplDoc |
doxygen style comments in the Impl file
Definition at line 228 of file token.h.
Referenced by TokenTree::AppendDocumentation(), TokenTree::GetDocumentation(), and TokenTree::RemoveFile().
unsigned int Token::m_ImplFileIdx |
function implementation file index
Definition at line 216 of file token.h.
Referenced by TokenTree::AppendDocumentation(), TokenTree::CheckChildRemove(), ParserThread::DoAddToken(), GetImplFilename(), NativeParserBase::GetTokenFromCurrentLine(), ParserThread::HandleNamespace(), MatchesFiles(), CodeCompletion::ParseFunctionsAndFillToolbar(), and TokenTree::RemoveFile().
unsigned int Token::m_ImplLine |
function implementation line index
Definition at line 219 of file token.h.
Referenced by ParserThread::DoAddToken(), CodeCompletion::DoAllMethodsImpl(), NativeParser::FindCurrentFunctionStart(), DocumentationHelper::GenerateHTML(), NativeParserBase::GetTokenFromCurrentLine(), ParserThread::HandleClass(), ParserThread::HandleEnum(), ParserThread::HandleNamespace(), DocumentationHelper::OnDocumentationLink(), CodeCompletion::OnGotoDeclaration(), CodeCompletion::OnGotoFunction(), ClassBrowser::OnJumpTo(), CCDebugInfo::OnSave(), ClassBrowser::OnTreeItemDoubleClick(), NativeParser::ParseFunctionArguments(), CodeCompletion::ParseFunctionsAndFillToolbar(), TokenTree::RemoveFile(), and ClassBrowser::ShowMenu().
unsigned int Token::m_ImplLineEnd |
if token is impl, closing brace line
Definition at line 225 of file token.h.
Referenced by ParserThread::DoAddToken(), NativeParserBase::GetTokenFromCurrentLine(), ParserThread::HandleClass(), ParserThread::HandleEnum(), ParserThread::HandleNamespace(), NativeParser::ParseFunctionArguments(), and CodeCompletion::ParseFunctionsAndFillToolbar().
unsigned int Token::m_ImplLineStart |
if token is impl, opening brace line
Definition at line 222 of file token.h.
Referenced by ParserThread::DoAddToken(), NativeParserBase::GetTokenFromCurrentLine(), ParserThread::HandleClass(), ParserThread::HandleEnum(), ParserThread::HandleNamespace(), and NativeParser::ParseLocalBlock().
int Token::m_Index |
current Token index in the tree, it is index of the std::vector<Token*>, so use the index, we can first get a address of the Token, and after a dereference, we can get the Token instance.
Note that the tree is a dynamic object, which means Tokens can be added or removed from the tree, so the slot of std::vector<Token*> is reused. So, same index does not point to the same Token if TokenTree are updated or changed.
Definition at line 262 of file token.h.
Referenced by Tokenizer::AddMacroDefinition(), ClassBrowserBuilderThread::AddMembersOf(), TokenTree::AddTokenToList(), ParserThread::CalcEnumExpression(), NativeParserBase::CollectSearchScopes(), ParserThread::DoAddToken(), CodeCompletion::DoCodeComplete(), ParserThread::DoParse(), ClassBrowserBuilderThread::ExpandItem(), NativeParserBase::FindAIMatches(), NativeParser::FindCurrentFunctionStart(), ParserThread::FindTokenFromQueue(), DocumentationHelper::GenerateHTML(), NativeParserBase::GenerateResultSet(), NativeParserBase::GetTokenFromCurrentLine(), CodeCompletion::OnGotoDeclaration(), NativeParser::ParseFunctionArguments(), NativeParser::ParseLocalBlock(), TokenTree::RecalcInheritanceChain(), TokenTree::RemoveToken(), TokenTree::RenameToken(), NativeParserBase::ResolveExpression(), ParserThread::TokenExists(), ClassBrowserBuilderThread::TokenMatchesFilter(), and CodeCompletion::UpdateEditorSyntax().
bool Token::m_IsAnonymous |
Is anonymous token? (e.g.
unnamed struct or union)
Definition at line 254 of file token.h.
Referenced by NativeParserBase::AddChildrenOfUnnamed(), ParserThread::HandleClass(), ParserThread::HandleEnum(), NativeParserBase::IsChildOfUnnamedOrEnum(), and ParserThread::RefineAnonymousTypeToken().
bool Token::m_IsConst |
the member method is const (yes/no)
Definition at line 248 of file token.h.
Referenced by CodeCompletion::DoAllMethodsImpl(), DocumentationHelper::GenerateHTML(), ParserThread::HandleFunction(), and NativeParserBase::PrettyPrintToken().
bool Token::m_IsLocal |
if true, means the token belong to a C::B project, it exists in the project's source/header files, not from the system's headers or other include header files
Definition at line 242 of file token.h.
Referenced by ClassBrowserBuilderThread::AddNodes(), ClassBrowserBuilderThread::CreateSpecialFolders(), ParserThread::DoAddToken(), ParserThread::FindTokenFromQueue(), TokenTree::MarkFileTokensAsLocal(), and ClassBrowserBuilderThread::TokenMatchesFilter().
bool Token::m_IsNoExcept |
the member method is noexcept (yes/no)
Definition at line 251 of file token.h.
Referenced by CodeCompletion::DoAllMethodsImpl(), DocumentationHelper::GenerateHTML(), ParserThread::HandleFunction(), and NativeParserBase::PrettyPrintToken().
bool Token::m_IsOperator |
is operator overload function?
Definition at line 237 of file token.h.
Referenced by NativeParserBase::AddConstructors(), NativeParserBase::ComputeCallTip(), ParserThread::DoAddToken(), NativeParserBase::FindAIMatches(), and NativeParserBase::ResolveExpression().
bool Token::m_IsTemp |
local (automatic) variable
Definition at line 245 of file token.h.
Referenced by ParserThread::DoAddToken(), CodeCompletion::DoCodeComplete(), NativeParser::ParseLocalBlock(), and ClassBrowserBuilderThread::TokenMatchesFilter().
unsigned int Token::m_Line |
Line index where the token was met, which is 1 based.
Definition at line 210 of file token.h.
Referenced by CCTreeCtrl::CBLineCompare(), ParserThread::DoAddToken(), CodeCompletion::DoAllMethodsImpl(), DocumentationHelper::OnDocumentationLink(), CodeCompletion::OnGotoDeclaration(), CodeCompletion::OnGotoFunction(), ClassBrowser::OnJumpTo(), CCDebugInfo::OnSave(), ClassBrowser::OnTreeItemDoubleClick(), and TokenTree::RemoveFile().
wxString Token::m_Name |
Token's name, it can be searched in the TokenTree.
Definition at line 188 of file token.h.
Referenced by NativeParserBase::AddConstructors(), ClassBrowserBuilderThread::AddNodes(), TokenTree::AddToken(), TokenTree::AddTokenToList(), CCTreeCtrl::CBAlphabetCompare(), NativeParserBase::ComputeCallTip(), DisplayName(), CCDebugInfo::DisplayTokenInfo(), ParserThread::DoAddToken(), CodeCompletion::DoAllMethodsImpl(), CodeCompletion::DoCodeComplete(), InsertClassMethodDlgHelper::DoFillMethodsFor(), ParserThread::DoParse(), ClassBrowserBuilderThread::ExpandNamespaces(), CCDebugInfo::FillAncestors(), CCDebugInfo::FillChildren(), InsertClassMethodDlg::FillClasses(), CCDebugInfo::FillDescendants(), InsertClassMethodDlg::FillMethods(), NativeParserBase::FindAIMatches(), NativeParserBase::FindCurrentFunctionScope(), NativeParser::FindCurrentFunctionStart(), ParserThread::FindTokenFromQueue(), ClassBrowser::FoundMatch(), DocumentationHelper::GenerateHTML(), NativeParserBase::GenerateResultSet(), Tokenizer::GetMacroExpandedText(), GetNamespace(), ParserThread::HandleClass(), ParserThread::HandleFunction(), NativeParserBase::IsAllocator(), DocumentationHelper::OnDocumentationLink(), CCDebugInfo::OnFindClick(), CodeCompletion::OnGotoFunction(), ClassBrowser::OnJumpTo(), CCDebugInfo::OnSave(), ClassBrowser::OnSearch(), ClassBrowser::OnTreeItemDoubleClick(), NativeParser::ParseBufferForUsingNamespace(), NativeParser::ParseFunctionArguments(), CodeCompletion::ParseFunctionsAndFillToolbar(), NativeParser::ParseLocalBlock(), NativeParserBase::PrettyPrintToken(), ParserThread::ReadClsNames(), ParserThread::ReadVarNames(), TokenTree::RecalcFullInheritance(), TokenTree::RecalcInheritanceChain(), TokenTree::RemoveToken(), TokenTree::RenameToken(), NativeParserBase::ResolveExpression(), and CodeCompletion::UpdateEditorSyntax().
int Token::m_ParentIndex |
Parent Token index.
Definition at line 265 of file token.h.
Referenced by Tokenizer::AddMacroDefinition(), TokenTree::AddToken(), NativeParserBase::CollectSearchScopes(), NativeParserBase::DependsOnAllocator(), ParserThread::DoAddToken(), CodeCompletion::DoAllMethodsImpl(), NativeParserBase::FindAIMatches(), NativeParserBase::FindCurrentFunctionScope(), ParserThread::FindTokenFromQueue(), DocumentationHelper::GenerateHTML(), NativeParserBase::GenerateResultSet(), GetNamespace(), ClassBrowserBuilderThread::Init(), ClassBrowser::OnSearch(), CodeRefactoring::Parse(), NativeParser::ParseLocalBlock(), NativeParserBase::PrettyPrintToken(), TokenTree::RemoveToken(), NativeParserBase::ResolveExpression(), TokenTree::TokenExists(), CodeCompletion::UpdateEditorSyntax(), and CodeRefactoring::VerifyResult().
TokenScope Token::m_Scope |
public? private? protected?
Definition at line 231 of file token.h.
Referenced by NativeParserBase::AddChildrenOfEnum(), NativeParserBase::AddChildrenOfUnnamed(), NativeParserBase::AddConstructors(), ClassBrowserBuilderThread::AddNodes(), CCTreeCtrl::CBScopeCompare(), NativeParserBase::ComputeCallTip(), ParserThread::DoAddToken(), InsertClassMethodDlgHelper::DoFillMethodsFor(), DocumentationHelper::GenerateHTML(), NativeParser::GetTokenKindImage(), GetTokenScopeString(), ParserThread::HandleEnum(), and CodeCompletion::UpdateEditorSyntax().
wxString Token::m_TemplateAlias |
alias for templates, e.g.
template T1 T2;
Definition at line 294 of file token.h.
Referenced by NativeParserBase::AddTemplateAlias().
wxString Token::m_TemplateArgument |
template argument list, comma separated list string
Definition at line 283 of file token.h.
Referenced by ClassBrowserBuilderThread::AddNodes(), TokenTree::AddTokenToList(), NativeParserBase::DependsOnAllocator(), DisplayName(), ParserThread::DoAddToken(), ParserThread::HandleClass(), ParserThread::HandleFunction(), and ParserThread::ResolveTemplateArgs().
a string to string map from formal template argument to actual template argument
Definition at line 291 of file token.h.
Referenced by ParserThread::HandleFunction(), NativeParserBase::ResolveExpression(), ParserThread::ResolveTemplateArgs(), and ~Token().
wxArrayString Token::m_TemplateType |
for a class template, this is the formal template argument list, but for a variable Token, this is the actual template arguments.
Definition at line 288 of file token.h.
Referenced by ParserThread::HandleClass(), ParserThread::HandleTypedef(), ParserThread::ResolveTemplateArgs(), ParserThread::ResolveTemplateMap(), and ~Token().
|
protected |
This is used in class browser to avoid duplication nodes in the class browser tree.
Once a Token is allocated from the heap, a new ticket number is assigned to the Token, so a new node is only added to the class browser tree if a Token with new ticket is detected.
Definition at line 311 of file token.h.
Referenced by GetTicket().
TokenKind Token::m_TokenKind |
See TokenKind class.
Definition at line 234 of file token.h.
Referenced by NativeParserBase::AddChildrenOfEnum(), NativeParserBase::AddChildrenOfUnnamed(), NativeParserBase::AddConstructors(), Tokenizer::AddMacroDefinition(), ClassBrowserBuilderThread::AddMembersOf(), ClassBrowserBuilderThread::AddNodes(), NativeParserBase::AddTemplateAlias(), TokenTree::AddToken(), NativeParserBase::CleanupSearchScope(), NativeParserBase::ComputeCallTip(), ClassBrowserBuilderThread::CreateSpecialFolders(), DisplayName(), ParserThread::DoAddToken(), CodeCompletion::DoAllMethodsImpl(), CodeCompletion::DoCodeComplete(), InsertClassMethodDlgHelper::DoFillMethodsFor(), ParserThread::DoParse(), ClassBrowserBuilderThread::ExpandItem(), ClassBrowserBuilderThread::ExpandNamespaces(), InsertClassMethodDlg::FillClasses(), NativeParserBase::FindAIMatches(), NativeParserBase::FindCurrentFunctionScope(), NativeParser::FindCurrentFunctionStart(), TokenTree::FindMatches(), ParserThread::FindTokenFromQueue(), TokenTree::FindTokensInFile(), DocumentationHelper::GenerateHTML(), NativeParserBase::GenerateResultSet(), NativeParserBase::GetTokenFromCurrentLine(), NativeParser::GetTokenKindImage(), GetTokenKindString(), ParserThread::HandleClass(), ParserThread::HandleTypedef(), NativeParserBase::IsChildOfUnnamedOrEnum(), CodeCompletion::OnGotoDeclaration(), CodeCompletion::OnGotoFunction(), CCDebugInfo::OnSave(), ClassBrowser::OnSearch(), ClassBrowser::OnTreeItemDoubleClick(), CodeRefactoring::Parse(), CodeCompletion::ParseFunctionsAndFillToolbar(), NativeParser::ParseLocalBlock(), NativeParserBase::PrettyPrintToken(), TokenTree::RecalcFullInheritance(), TokenTree::RecalcInheritanceChain(), NativeParserBase::RemoveLastFunctionChildren(), NativeParserBase::ResolveExpression(), NativeParserBase::ResolveOperator(), ParserThread::ResolveTemplateMap(), ClassBrowser::ShowMenu(), ClassBrowserBuilderThread::TokenContainsChildrenOfKind(), TokenTree::TokenExists(), and CodeCompletion::UpdateEditorSyntax().
|
protected |
a pointer to TokenTree
Definition at line 305 of file token.h.
Referenced by TokenTree::AddTokenToList(), DeleteAllChildren(), GetFilename(), GetImplFilename(), GetNamespace(), GetTree(), and InheritsFrom().
void* Token::m_UserData |
custom user-data (the classbrowser expects it to be a pointer to a cbProject), this field is used when user can only show the tokens belong to the current C::B project in the browser tree.
m_UserData is updated in the worker threaded task: MarkFileAsLocalThreadedTask
Definition at line 300 of file token.h.
Referenced by TokenTree::MarkFileTokensAsLocal(), and ClassBrowserBuilderThread::TokenMatchesFilter().
int Token::start |
Definition at line 65 of file parsewatchvalue.cpp.
Referenced by DetectRepeatingSymbols(), ExtractString(), GetNextToken(), operator==(), ParseGDBWatchValue(), TokenizeGDBLocals(), and Trim().
Type Token::type |
Definition at line 66 of file parsewatchvalue.cpp.
Referenced by GetNextToken(), operator==(), and ParseGDBWatchValue().