User forums > General (but related to Code::Blocks)
No Syntax Highlighting for C++ Code
oBFusCATed:
ollydbg: The question is: does scintilla support such thing...
ollydbg:
--- Quote from: oBFusCATed on January 19, 2011, 05:34:40 pm ---ollydbg: The question is: does scintilla support such thing...
--- End quote ---
to highlight some text in scintilla,
1, scintilla has some(many) keyword groups, each groups can have different text styles(color, bold, italic....)
2, We just add/remove these groups dynamically when we switch translation unit. the clang can supply a full AST, and also we can create a AST interator, and walk through the AST, and build these groups.
3, once the groups are built, it's the scintilla's duty to high light the text.
BTW:
Codelite IDE has this kind of feature, and I have even post some code snippet of Codelite to show how it correct/build the groups in C::B's forum several days ago.
lordnoxx:
Hey guys. I am back. I think i found a bug in c::b 10.05. I am not sure this still exists in the latest nightly build but i post it anyway.
OK...i have the following code:
--- Code: ---#include <iostream>
#include <fstream>
using namespace std;
int main()
{
fstream hhh;
hhh.
return 0;
}
--- End code ---
When typing "hhh." there should appear the code completion list. But it does not...until i close the project and reopen it. Then it works.
Can you guys confirm this?
MortenMacFly:
--- Quote from: lordnoxx on January 20, 2011, 06:19:47 pm ---Can you guys confirm this?
--- End quote ---
What happens if you save after you declared the type (fstream hhh;) and then CC the next line "hhh."?
lordnoxx:
Saving the file after declaring the type changes nothing. What does "CC the next line" mean?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version