fix rust raw string highlighting #2552
parent
96183b6e44
commit
075be30f2c
|
@ -270,6 +270,8 @@ export const language = <languages.IMonarchLanguage>{
|
|||
|
||||
tokenizer: {
|
||||
root: [
|
||||
// Raw string literals
|
||||
[/r(?=#*")/, { token: 'string.raw', bracket: '@open', next: '@stringraw' }],
|
||||
[
|
||||
/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,
|
||||
{
|
||||
|
@ -327,6 +329,10 @@ export const language = <languages.IMonarchLanguage>{
|
|||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
stringraw: [
|
||||
[/[^#"]/, 'string.raw'],
|
||||
[/(#*)".*?"\1/, { token: 'string.raw', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
numbers: [
|
||||
//Octal
|
||||
[/(0o[0-7_]+)(@intSuffixes)?/, { token: 'number' }],
|
||||
|
|
Loading…
Reference in New Issue