Skip to content

Commit

Permalink
Fix rust byte char capture (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicHorrorDev committed Jan 29, 2023
1 parent 0ea6503 commit 87869f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lexers/embedded/rust.xml
Expand Up @@ -238,7 +238,7 @@
<rule pattern="&#39;(\\[&#39;&#34;\\nrt]|\\x[0-7][0-9a-fA-F]|\\0|\\u\{[0-9a-fA-F]{1,6}\}|.)&#39;">
<token type="LiteralStringChar"/>
</rule>
<rule pattern="(b)(&#39;(\\[&#39;&#34;\\nrt]|\\x[0-9a-fA-F]{2}|\\0|\\u\{[0-9a-fA-F]{1,6}\}|.)&#39;)">
<rule pattern="(b)(&#39;(?:\\[&#39;&#34;\\nrt]|\\x[0-9a-fA-F]{2}|\\0|.)&#39;)">
<bygroups>
<token type="LiteralStringAffix"/>
<token type="LiteralStringChar"/>
Expand Down
3 changes: 2 additions & 1 deletion lexers/testdata/rust/lifetimes_and_loop_labels.expected
Expand Up @@ -100,7 +100,8 @@
{"type":"TextWhitespace","value":" "},
{"type":"Operator","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"Error","value":"b'a'"},
{"type":"LiteralStringAffix","value":"b"},
{"type":"LiteralStringChar","value":"'a'"},
{"type":"Punctuation","value":";"},
{"type":"TextWhitespace","value":"\n "},
{"type":"KeywordDeclaration","value":"let"},
Expand Down

0 comments on commit 87869f8

Please sign in to comment.