Open fizruk opened 9 months ago
This seems to be a limitation of TextMate grammar. According to https://github.com/microsoft/vscode-textmate/issues/41#issuecomment-344294298, RegEx in TextMate will not match across multiple lines, meaning that all \s
s in the grammar will also suffer from this problem (and indeed I see the same issue when adding a new line between #define
and the definition name). This is further verified in this RegEx playground, where it successfully captured all groups of the Regular Expression.
Edit: this is also mentioned in section 12.2 of the TextMate docs
I believe it should be possible to fix it using begin
and end
captures, but that would probably be complicated and we might be better off adding it to the semantic highlighter.
Syntax highlighting currently assumes that
uses (...)
is on the same line as#define
. The highlighting should be more flexible.