summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2019-03-20 18:28:48 +0100
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2019-04-13 14:21:19 +0200
commit6639bec9e001e8042efc8feeec63def1292a7759 (patch)
tree91d08cb955f7fa4734f50c9ce3dd2898eab8d6ab
parentc0df4b403b3d760f9a9bd72d0da4967858bc4c53 (diff)
downloaddoxdocgen-6639bec9e001e8042efc8feeec63def1292a7759.tar.gz
Enums now are treated as type correctly
-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);