Synxtax highlighting for ninja build files adapted from SublimeNinja.
Direct port of SublimeNinja, with minor fixes.
-
Tweak regex to not match comments following declarations.
Even though the ninja manual does not explicitly state this,
- Comments cannot follow variable declarations (since the
#
will simply be part of the string) - Comments cannot follow rule declarations (parser errors occur)
Change regex so these are not mistakenly highlighted as comments.
- Comments cannot follow variable declarations (since the
-
Configure line comment symbol (
#
) soeditor.action.commentLine
etc. will work properly.