From 4dbc07d55700beb666a4006bbe05979862530ec4 Mon Sep 17 00:00:00 2001 From: nreed Date: Mon, 5 Jul 2021 11:27:32 -0400 Subject: [PATCH] Changed to use linecomment for continuation comments --- src/cpp/cpp.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cpp/cpp.ts b/src/cpp/cpp.ts index 6402bbd9..77beaa09 100644 --- a/src/cpp/cpp.ts +++ b/src/cpp/cpp.ts @@ -347,16 +347,22 @@ export const language = { [/[ \t\r\n]+/, ''], [/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'], [/\/\*/, 'comment', '@comment'], - [/\/\/.*\\$/, 'comment', '@comment'], + [/\/\/.*\\$/, 'comment', '@linecomment'], [/\/\/.*$/, 'comment'] ], comment: [ - [/.*[^\\]$/, 'comment', '@pop'], [/[^\/*]+/, 'comment'], [/\*\//, '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'],