summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Lang/Cpp/CppParser.ts1
-rw-r--r--src/test/CppTests/Parameters.test.ts5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/Lang/Cpp/CppParser.ts b/src/Lang/Cpp/CppParser.ts
index f080483..37c36eb 100644
--- a/src/Lang/Cpp/CppParser.ts
+++ b/src/Lang/Cpp/CppParser.ts
@@ -118,6 +118,7 @@ export default class CppParser implements ICodeParser {
"constexpr",
"const",
"struct",
+ "enum",
];
this.stripKeywords = [
diff --git a/src/test/CppTests/Parameters.test.ts b/src/test/CppTests/Parameters.test.ts
index 9487fe9..9c99100 100644
--- a/src/test/CppTests/Parameters.test.ts
+++ b/src/test/CppTests/Parameters.test.ts
@@ -65,6 +65,11 @@ suite("C++ - Parameters Tests", () => {
assert.equal("/**\n * @brief \n * \n * @param mat \n */", result);
});
+ test("Enum parameter", () => {
+ const result = testSetup.SetLine("void foo(enum foo bar);").GetResult();
+ assert.equal("/**\n * @brief \n * \n * @param bar \n */", result);
+ });
+
test("Const parameter with const pointer to const pointer", () => {
let result = testSetup.SetLine("void foo(const int * const * const a1);").GetResult();
assert.equal("/**\n * @brief \n * \n * @param a1 \n */", result);