Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

vector<int> is OK, but string or wstring no-work.

<< < (5/23) > >>

ollydbg:

--- Quote from: MortenMacFly on January 07, 2010, 02:35:01 pm ---
--- Quote from: ollydbg on January 07, 2010, 02:08:26 pm ---No, the first place when entering the DoParse function. we should set the state to "

--- End quote ---
Could you explain '' a little more? Set to what exactly? And what's with the second one?

--- End quote ---

OK, let me explain the old way( before the patch of Tokenizer state related code).
There is a variable named: m_SkipUnwantedTokens(true), you can see this from the constructor of Tokenizer, so, by default, this means in normal situation, we should let the Tokenizer skip some words. In very merely case, this variable would set to "true" to let the Tokenizer never skip anything.

So, the new way ( after applying my patch), I would set the state to "skipUnWanted", so this is the same behavour like the old one.


For the second place:
I'm sorry, that's my mistake, you are right!

MortenMacFly:

--- Quote from: ollydbg on January 07, 2010, 02:55:58 pm ---OK, let me explain the old way( before the patch of Tokenizer state related code). [...]

--- End quote ---
Thanks, that made things clear to me.

So finally, what happened to:

--- Code: ---m_Tokenizer.SetOperatorState(true);
--- End code ---
This is not applied anymore if I got the new implementation right. Look again:

--- Quote from: MortenMacFly on January 06, 2010, 02:47:09 pm ---For example (void ParserThread::DoParse()):
Before:

--- Code: ---        else if (token==ParserConsts::kw_operator)
        {
            bool oldState = m_Tokenizer.IsSkippingUnwantedTokens();
            m_Tokenizer.SetSkipUnwantedTokens(false);
            m_Tokenizer.SetOperatorState(true);

--- End code ---
After:

--- Code: ---            TokenizerState oldState = m_Tokenizer.GetState();
            m_Tokenizer.SetState(tsSkipNone);

--- End code ---

--- End quote ---
Any comments on that...?!

ollydbg:

--- Quote from: MortenMacFly on January 07, 2010, 03:05:07 pm ---So finally, what happened to:

--- Code: ---m_Tokenizer.SetOperatorState(true);
--- End code ---
This is not applied anymore if I got the new implementation right. Look again:

--- Quote from: MortenMacFly on January 06, 2010, 02:47:09 pm ---For example (void ParserThread::DoParse()):
Before:

--- Code: ---        else if (token==ParserConsts::kw_operator)
        {
            bool oldState = m_Tokenizer.IsSkippingUnwantedTokens();
            m_Tokenizer.SetSkipUnwantedTokens(false);
            m_Tokenizer.SetOperatorState(true);

--- End code ---
After:

--- Code: ---            TokenizerState oldState = m_Tokenizer.GetState();
            m_Tokenizer.SetState(tsSkipNone);

--- End code ---

--- End quote ---
Any comments on that...?!

--- End quote ---


I personally don't think we need another variable to specify we are after the operator statement.

for example:


--- Code: ---void AAA::operator + (XXXX)
or
void AAA::operator = (XXXX)

--- End code ---

In such situations, the word after "operator" should return from GetToken() function. ( They won't be skipped ). So, I think once we meet a "operator" word, we need to set the TokenizerState to "tsSkipNone".

Is that OK?  :D

ollydbg:
Test report:
rev 6067 trunk windows.
CodeCompletion testing workspace:
function_args.cpp can't full pass.

--- Code: ---//    i_integer = from.i_;
//    f_float   = from.f_;
--- End code ---
stl.cpp can't fully pass

--- Code: ---  std::string ss;
  ss.
--- End code ---
stl_namespace.cpp can't fully pass.

--- Code: ---  string s;
  s.
--- End code ---
structs_typedefs.cpp can't fully pass.

--- Code: ---    std::string ss;
    my_string   ms;
    ss.
--- End code ---

I'm try to find the bug, but these days I'm a little busy :?

ollydbg:
Ok, have a further test, I'm fully agree with blueshake's No ancestor's in the current string Token, so, the "string" have no ancestors, that's the reason why we don't have string members list auto completion.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version