diff options
| author | Christoph Schlosser <christoph@linux.com> | 2019-06-22 18:07:44 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2019-06-22 18:07:44 +0200 |
| commit | 2f358e66df977d696335816876fad7e759efcb8e (patch) | |
| tree | be58dff12f49403206702857f0489d8ff2b1d5f6 /src/Lang/Cpp/CppParser.ts | |
| parent | 24f919cccad600fcf32d86ec90edfeec21a372ab (diff) | |
| parent | 2d7a744527e469397a6dce6f27d60fac4382ee53 (diff) | |
| download | doxdocgen-2f358e66df977d696335816876fad7e759efcb8e.tar.gz | |
Merge remote-tracking branch 'origin/master' into indent-option
Diffstat (limited to 'src/Lang/Cpp/CppParser.ts')
| -rw-r--r-- | src/Lang/Cpp/CppParser.ts | 18 |
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; + } + } } |