diff --git a/src/cpp/cpp.ts b/src/cpp/cpp.ts index 525b2551..6402bbd9 100644 --- a/src/cpp/cpp.ts +++ b/src/cpp/cpp.ts @@ -347,10 +347,12 @@ export const language = { [/[ \t\r\n]+/, ''], [/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'], [/\/\*/, 'comment', '@comment'], + [/\/\/.*\\$/, 'comment', '@comment'], [/\/\/.*$/, 'comment'] ], comment: [ + [/.*[^\\]$/, 'comment', '@pop'], [/[^\/*]+/, 'comment'], [/\*\//, 'comment', '@pop'], [/[\/*]/, 'comment']