fix(cpp): fix integer suffix regex (CI passed)

This commit is contained in:
LadyRick 2021-08-19 21:21:23 +08:00 committed by GitHub
parent 1003cde6f7
commit 39085a622b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -273,7 +273,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: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
integersuffix: /((l|L|ll|LL)?(u|U)?)|((u|U)?(l|L|ll|LL)?)/, 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/,
@ -356,13 +356,13 @@ export const language = <languages.IMonarchLanguage>{
[/\*\//, 'comment', '@pop'], [/\*\//, 'comment', '@pop'],
[/[\/*]/, 'comment'] [/[\/*]/, 'comment']
], ],
//For use with continuous line comments //For use with continuous line comments
linecomment: [ linecomment: [
[/.*[^\\]$/, 'comment', '@pop'], [/.*[^\\]$/, 'comment', '@pop'],
[/[^]+/, 'comment'] [/[^]+/, 'comment']
], ],
//Identical copy of comment above, except for the addition of .doc //Identical copy of comment above, except for the addition of .doc
doccomment: [ doccomment: [
[/[^\/*]+/, 'comment.doc'], [/[^\/*]+/, 'comment.doc'],