Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
vector<int> is OK, but string or wstring no-work.
ollydbg:
--- Quote from: blueshake on January 17, 2010, 02:40:20 am ---
--- Quote ---I think a variable in Tokenizer class can be removed, because it is never used any more.
Code:
bool m_IsOperator;
BTW: comparing with the "operator" keyword is done in the ParserThread class instead of Tokenizer class.
--- End quote ---
@ollydbg
it was used here in nativeparser.cpp
--- Code: ---if (!token)
{
if (s_DebugSmartSense)
Manager::Get()->GetLogManager()->DebugLog(_T("FindAIMatches() Token is NULL?!"));
continue;
}
// ignore operators
if (token->m_IsOperator)
continue;
// enums children (enumerators), are added by default
if (token->m_TokenKind == tkEnum)
{
// insert enum type
result.insert(id);
--- End code ---
--- End quote ---
No, There is a member m_IsOperator in the Token class. so does in Tokenizer class.
blueshake:
test codes:
--- Code: ---#include <iostream>
using namespace std;
int abc(int aa)
{
int bb;
aa----------------------not work here.
return 0;
}
int main()
{
cout << "Hello world!" << endl;
return 0;
}
--- End code ---
issue:
the cc can not do codecompletion for variable aa
reason:
I suspect that the function arguments were not parsed.
see the output log.yoou can see that only one temp token bb was added.
--- Quote ---ParseLocalBlock() Block:
int bb;
aa
ParseLocalBlock() Local tokens:
ParseLocalBlock() + int bb parent =
AI() AI enter, actual_search: " aa"
AI() =========================================================
--- End quote ---
And see the output log of work version,two temp tokens(aa and bb) were added.
--- Quote ---ParseLocalBlock() Block:
int bb;
aa
ParseLocalBlock() Local tokens:
ParseLocalBlock() + int aa parent =
ParseLocalBlock() + int bb parent =
AI() AI enter, actual: " aa"
AI() =========================================================
--- End quote ---
Loaden:
--- Code: ---#include <iostream>
#include <map>
#include <string>
int main()
{
typedef std::map<int, std::string> TestMap;
TestMap testMap;
// testMap. // not work!
std::map<int, std::string> m;
m.insert(1, "Hello World!"); // work fine.
return 0;
}
--- End code ---
[attachment deleted by admin]
blueshake:
--- Quote --- std::map<int, std::string> m;
m.insert(1, "Hello World!"); // work fine.
--- End quote ---
not work for me.
I search the tokenstree and get nothing.
Loaden:
--- Quote from: blueshake on January 17, 2010, 01:07:28 pm ---
--- Quote --- std::map<int, std::string> m;
m.insert(1, "Hello World!"); // work fine.
--- End quote ---
not work for me.
I search the tokenstree and get nothing.
--- End quote ---
[attachment deleted by admin]
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version