[Qt-interest] Syntax Highlighter State Stack

Neel Basu neel.basu.z at gmail.com
Tue Dec 30 18:50:46 CET 2008


I am Making a Syntax Highlighter for PHP
there are a lot of states such as
		enum State{
			NormalState = -1,
			InPHPCodeBlock,
			InFunction,
			InClass,
			InMultiComment,
			InCurlyBraces
		};
Now Its possible that some code block is in InMultiComment which is in InFnction which is in InPHPCodeBlock
It is not possible to keep informations about these states in a single integer variable.
(Is it ??)
So I thought to keep a vector for this enum values which will be used as a StateStack

Now the question is am I on the right Track ?? or there are easier or safer or more standard alternatives ??

Neel



More information about the Qt-interest-old mailing list