Recognize \0 as an escape sequence

Closes microsoft/monaco-editor/issues/3439
This commit is contained in:
RubenRBS 2022-11-30 21:19:00 +01:00
parent 415b279fa0
commit d95ca35e28
No known key found for this signature in database
GPG key ID: 29AB6DB27F043B15

View file

@ -272,7 +272,7 @@ export const language = <languages.IMonarchLanguage>{
// we include these common regular expressions // we include these common regular expressions
symbols: /[=><!~?:&|+\-*\/\^%]+/, symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/, escapes: /\\(?:[0abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/, integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
floatsuffix: /[fFlL]?/, floatsuffix: /[fFlL]?/,
encoding: /u|u8|U|L/, encoding: /u|u8|U|L/,