From 42a085fbda8e742595cf5b543ac4f8202c03fb7d Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Fri, 26 Jun 2020 14:46:12 +0200 Subject: Return once we found preprocessor stuff (#158) * Return once we found preprocessor stuff * Add tests * Update package lock --- src/Lang/Cpp/CppParser.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Lang/Cpp/CppParser.ts') diff --git a/src/Lang/Cpp/CppParser.ts b/src/Lang/Cpp/CppParser.ts index d51f853..d59ec9b 100644 --- a/src/Lang/Cpp/CppParser.ts +++ b/src/Lang/Cpp/CppParser.ts @@ -424,6 +424,9 @@ export default class CppParser implements ICodeParser { if (nextLineTxt.startsWith("#include")) { this.commentType = CommentType.file; return ""; + } else if (nextLineTxt.startsWith("#")) { // preprocessor stuff + this.commentType = CommentType.method; + return "#"; } if (!this.isVsCodeAutoComplete(nextLineTxt)) { -- cgit v1.2.3