See: Project: Implementing a Custom Syntax Highlighter