Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix CommentPreproc regex (and update corresponding test)
  • Loading branch information
wo80 committed Aug 15, 2023
commit f1934ff7091b69b1a656320351cfae77e6b25838
2 changes: 1 addition & 1 deletion lexers/embedded/csharp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<rule pattern="0[xX][0-9a-fA-F]+[Ll]?|\d[_\d]*(\.\d*)?([eE][+-]?\d+)?[flFLdD]?">
<token type="LiteralNumber"/>
</rule>
<rule pattern="#[ \t]*(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma|nullable)\b[^\n\r]+">
<rule pattern="#[ \t]*(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma|nullable)\b">
<token type="CommentPreproc"/>
</rule>
<rule pattern="\b(extern)(\s+)(alias)\b">
Expand Down
4 changes: 3 additions & 1 deletion lexers/testdata/csharp/csharp_8_nullable.expected
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
{"type":"NameNamespace","value":"System"},
{"type":"Punctuation","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"CommentPreproc","value":"#nullable enable"},
{"type":"CommentPreproc","value":"#nullable"},
{"type":"Text","value":" "},
{"type":"Name","value":"enable"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"public"},
{"type":"Text","value":" "},
Expand Down