Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Partial C/C++ preprocessor function for codecompletion
nullwu:
--- Quote from: ollydbg on October 23, 2009, 02:52:58 am ---<...deleted...>
Also, It seems the patch is against debugger_branch. :D
--- End quote ---
No, I always merge with trunk. but I'm watching the debugger branch too.
--- Quote from: MortenMacFly on October 23, 2009, 07:07:13 am ---1.) Why exactly are you using the scripting engine? I didn't get the reason for that from a quick look. This surely makes the processing (of whatever) quite slow.
2.) You are accessing UI controls out of the parser thread (ParserThread::PreprocessorStyling). This will surely lead into a crash sooner or later. Why are you doing so?
--- End quote ---
Yes, scripting engine will slow down parsing, but it's result will guide CC to override some unnecessary parsing, it's worthy.
The PreprocessorStryling() is activated only under ParseBuffer* , so far, these series are called only from main thread. So it's safe for now.
--- Quote from: Ceniza on October 23, 2009, 09:34:09 am ---
--- Quote from: ollydbg on October 23, 2009, 07:20:53 am ---
--- Quote from: MortenMacFly on October 23, 2009, 07:07:13 am ---<...>
--- End quote ---
This is the question I would like to ask either.
I'm not fully understand the whole code, but it seems the author use the Sq script engine to evaluate the #if condition's value.
--- End quote ---
If that's all he uses scripting for, my template abusive implementation of a preprocessor has the code to evaluate that in the file constexprevaluator.h.
<...>
--- End quote ---
Yes, that's all I use scripting for.
finally, something needs more description,
It needs reparsing 2~4 times when the project is the first time to load.
After batch parsing(reparsing), it will (re)produce a <proj>.ccdepend file.
It just calculate the 'header file' dependency, not macro, it does not maintain a exact define-use chain.
MortenMacFly:
--- Quote from: Ceniza on October 23, 2009, 09:34:09 am ---constexprevaluator.h.
--- End quote ---
Where is that?
Ceniza:
--- Quote from: MortenMacFly on October 23, 2009, 10:22:14 am ---
--- Quote from: Ceniza on October 23, 2009, 09:34:09 am ---constexprevaluator.h.
--- End quote ---
Where is that?
--- End quote ---
Here (CCPP.zip). After decompressing it, it's in CCPP/include/lexer/pp.
Navigation
[0] Message Index
[*] Previous page
Go to full version