Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

fix(cpp): fix cpp language integer suffix #156

Merged
merged 3 commits into from
Aug 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cpp/cpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export const language = <languages.IMonarchLanguage>{
// we include these common regular expressions
symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
integersuffix: /(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,
integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
floatsuffix: /[fFlL]?/,
encoding: /u|u8|U|L/,

Expand Down Expand Up @@ -356,13 +356,13 @@ export const language = <languages.IMonarchLanguage>{
[/\*\//, 'comment', '@pop'],
[/[\/*]/, 'comment']
],

//For use with continuous line comments
linecomment: [
[/.*[^\\]$/, 'comment', '@pop'],
[/[^]+/, 'comment']
],

//Identical copy of comment above, except for the addition of .doc
doccomment: [
[/[^\/*]+/, 'comment.doc'],
Expand Down