summaryrefslogtreecommitdiffstats
path: root/src/Lang/Cpp/CppParser.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/Lang/Cpp/CppParser.ts')
-rw-r--r--src/Lang/Cpp/CppParser.ts18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/Lang/Cpp/CppParser.ts b/src/Lang/Cpp/CppParser.ts
index 37c36eb..ca5edbb 100644
--- a/src/Lang/Cpp/CppParser.ts
+++ b/src/Lang/Cpp/CppParser.ts
@@ -111,6 +111,8 @@ export default class CppParser implements ICodeParser {
private casingType: CasingType;
+ private vscodeAutoGeneratedComment: boolean;
+
constructor(cfg: Config) {
this.cfg = cfg;
@@ -301,6 +303,7 @@ export default class CppParser implements ICodeParser {
this.specialCase = SpecialCase.none;
this.commentType = CommentType.method;
+ this.vscodeAutoGeneratedComment = false;
}
/**
@@ -369,6 +372,7 @@ export default class CppParser implements ICodeParser {
this.specialCase,
this.commentType,
this.casingType,
+ this.vscodeAutoGeneratedComment,
);
}
@@ -421,7 +425,9 @@ export default class CppParser implements ICodeParser {
return "";
}
- logicalLine += "\n" + nextLineTxt;
+ if (!this.isVsCodeAutoComplete(nextLineTxt)) {
+ logicalLine += "\n" + nextLineTxt;
+ }
}
throw new Error("More than " + linesToGet + " lines were read from editor and no end of expression was found.");
@@ -799,4 +805,14 @@ export default class CppParser implements ICodeParser {
return args;
}
+
+ private isVsCodeAutoComplete(line: string): boolean {
+ switch (line) {
+ case "*/":
+ this.vscodeAutoGeneratedComment = true;
+ return true;
+ default:
+ return false;
+ }
+ }
}