Author Topic: Pseudo semantic highlighting  (Read 27080 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Pseudo semantic highlighting
« Reply #15 on: January 31, 2013, 10:53:54 pm »
  • List functions in the current file
    • Collect the classes they are from
  • List the classes in the current file
  • Iterate through the member variables of both lists of classes
  • Put this list of variables in Scintilla's (previously unused by Code::Blocks) keyword set for "Global classes and typedefs"
Basically, only type tkVariable is added.  These are filtered, so that the highlighted tokens are member variables that are relevant (classes that are declared/implemented, their ancestors) to the current editor (and global variables in *.c).

Each stopwatch collects (essentially) the same information, however they represent 4 slightly different algorithms for doing it (I was attempting to see if I could squeeze a little extra speed out of it).  In my testing, though, each algorithm has nearly the same performance.

I have a cleaned up version that I plan to add to the queue soon (if no further modifications are warranted).

(Apologies; I have been busy, and rather inactive here recently.)