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

A patch adding a state variable to Tokenizer class

(1/1)

ollydbg:
Welcome to test it.

1, I add a state variable to Tokenizer, and this will make the code more clearer. So, we can still use the GetToken() and PeekToken() with out any argument. also, I just re-factor the SkipUnWanted() function.
2, add a attempt to deal variable seperated by commas problem.(these related code is developed by blueshake).



[attachment deleted by admin]

MortenMacFly:
Mmmmh... a few things are not clear to me:

For example: Why did you remove theis code:

--- Code: ---#ifdef __WXMSW__ // This is a Windows only bug!
    else if (c == 178 || c == 179 || c == 185) // fetch ² and ³
    {
        str = c;
        MoveToNextChar();
    }
#endif

--- End code ---
???

This re-introduces a critical crash-bug on Windows?!

You've removed quite some portions... could you explain a little more why exactly? Or did you have a difference code base?

ollydbg:
@morten:
Sorry, That's my fault. That's becaus In my Chinese Windows XP, I can't see the charactor well, sometimes, there will be shown a rectangle or a question mark. So, that's was a little annoying. So I delete that code. :wink:

Is there other question or comments?

MortenMacFly:

--- Quote from: ollydbg on January 01, 2010, 03:28:34 pm ---Is there other question or comments?

--- End quote ---
Sure. ;-)

The other thing is: Your re-factored the SkipUnwanted(bool bGetValue) quite heavily including the removal of handling of preprocessor directives (which makes m_IsPreprocessor and m_LastPreprocessor obsolete btw.). Why? This was working great?!

Finally shouldn't statements like:

--- Code: ---if ( m_State & tsSkipQuestion )
--- End code ---
better be:

--- Code: ---if ( (m_State & tsSkipQuestion) == tsSkipQuestion)
--- End code ---
(Need to have a look myself to see how the bits are defined though...)

ollydbg:

--- Quote from: MortenMacFly on January 01, 2010, 07:44:05 pm ---The other thing is: Your re-factored the SkipUnwanted(bool bGetValue) quite heavily including the removal of handling of preprocessor directives (which makes m_IsPreprocessor and m_LastPreprocessor obsolete btw.). Why? This was working great?!

--- End quote ---

Handle preprocessor is quite easy in ParserThread, So, I remove the handling preprocessor related code in Tokenizer, I don't think they are needed any more. :D Maybe, we need more test.

Navigation

[0] Message Index

Go to full version