- Declared in:
- SCKSourceFile.h
The SCKSyntaxHighlighter class is responsible for performing lexical and syntax highlighting on a single source file. Highlighting involves three steps:
1) Lexical markup. 2) Syntax markup. 3) Presentation markup.
Lexical highlighting is faster than full syntax highlighting, so it can be used more frequently in an editor. For example, you might run the lexical highlighter after every key press but defer the syntax highlighter until after a whitespace character had been entered.
The third step is optional. If you are not using AppKit, then you can ignore it and handle the presentation yourself. This is useful, for example, when generating semantic HTML from a source file.
Adds an include path to search when performing syntax highlighting.
Checks for errors and adds kSCKDiagnostic attributes to ranges in the source attributed string which contain them.
Returns completion result at the location
Performs lexical highlighting on the entire file.
Parses the contents of the file. Must be called before reapplying highlighting after the file has changed.
Performs syntax highlighting on the specified range.
- Declared in:
- SCKSourceFile.h