Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#267 Backport Zig lexer from Notepad4
This patch adds the Zig lexer from the Notepad4 editor originally created by Zufu Liu (@zufuliu) and convert it to an object lexer. Some changes have been made to make it compile and work in Scintilla since Notepad4 contains a modified Scintilla version. Also, some features of the Notepad4 lexer have been removed/changed: - special highlighting of formatting strings has been removed as it uses some extra functions added to Notepad4's Scintilla and I didn't want to spend much time on figuring out what would have to be back-ported - other lexilla lexers don't do this either anyway - folding has been modified to use simple folding like the rest of Scintilla lexers and not folding of the previous line based on brace presence on the next line like Notepad4 - "semi-syntactic" coloring of Notepad4 which colors functions following "fn" has been removed as this is not performed in other Scintilla lexers - highlighting of tasks such as TODOs in comments has been removed as it isn't present in other Scintilla lexers - colorig states and keywords have been renamed slightly - keywords at index 3 have been reserved for caller-supplied type names using SCI_SETKEYWORDS like in the C lexer (which we use in Geany to supply type names obtained using ctags) Add SCE_ZIG_COMMENTLINETOP state for top-level comments. Add styling function definitions I.e. identifiers after the "fn" keywords. Fixes #237.
- Loading branch information