|
|
This class implements a syntax parser to provide information to a syntax highlighted editor.
enum infoType { Normal=0, /** This is a keyword } | infoType |
Normal text
highlightInfo (struct) | highlightInfo |
Information about a change in highlighting.
bool isSymbol (QChar c)
| isSymbol |
[protected]
Check if this is part of a symbol or not.
toSyntaxAnalyzer (const char **keywords)
| toSyntaxAnalyzer |
Create a syntax analysed
Parameters:
keywords | A list of keywords. |
~toSyntaxAnalyzer ()
| ~toSyntaxAnalyzer |
[virtual]
std::list<highlightInfo> analyzeLine (const QString &str,infoType in,infoType &out)
| analyzeLine |
[virtual]
Analyze a line. There is no guarantee that lines will be called in any kind of order.
Parameters:
str | Line to analyze. |
in | Type at start of line. |
out | Type at start of next line. |
Returns: A list of where highlighting should change. Start as normal.
QColor getColor (infoType typ)
| getColor |
Get a colordefinition for a infoType value.
Parameters:
typ | infoType to get color for. |
Returns: Color of that type.
bool reservedWord (const QString &word)
| reservedWord |
Check if a word is reserved.
Parameters:
word | Word to check. |
Returns: True if word is reserved.
friend class toSyntaxSetup | toSyntaxSetup |
toSyntaxAnalyzer & defaultAnalyzer ()
| defaultAnalyzer |
[static]
Get the default syntax analyzer.
Returns: Reference to the default analyzer.