diff options
| author | Christoph Schlosser <christoph@linux.com> | 2019-10-05 15:28:09 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christophschlosser@users.noreply.github.com> | 2019-10-05 15:45:41 +0200 |
| commit | 1cf0a3b9762ad5734352fa25514e50caf27ae52f (patch) | |
| tree | 4649281b167bbb7c51edcf7084549b4a9e891cbf | |
| parent | 11c1fc3508c226094ba1ffeb09d7e464b342f9a8 (diff) | |
| download | doxdocgen-1cf0a3b9762ad5734352fa25514e50caf27ae52f.tar.gz | |
Ignore restrict keyword
| -rw-r--r-- | src/Lang/Cpp/CppParser.ts | 1 | ||||
| -rw-r--r-- | src/test/CppTests/Parameters.test.ts | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/Lang/Cpp/CppParser.ts b/src/Lang/Cpp/CppParser.ts index 0eb8a23..c6a72fb 100644 --- a/src/Lang/Cpp/CppParser.ts +++ b/src/Lang/Cpp/CppParser.ts @@ -121,6 +121,7 @@ export default class CppParser implements ICodeParser { "const", "struct", "enum", + "restrict", ]; this.stripKeywords = [ diff --git a/src/test/CppTests/Parameters.test.ts b/src/test/CppTests/Parameters.test.ts index 9c99100..cfcebe8 100644 --- a/src/test/CppTests/Parameters.test.ts +++ b/src/test/CppTests/Parameters.test.ts @@ -263,6 +263,11 @@ suite("C++ - Parameters Tests", () => { assert.equal("/**\n * @brief \n * \n * @param memberPointer \n */", result); }); + test("Restrict keyword", () => { + const result = testSetup.SetLine("void some_function(char *restrict buf, const size_t buflen);").GetResult(); + assert.equal("/**\n * @brief \n * \n * @param buf \n * @param buflen \n */", result); + }); + test("Type as variable name", () => { let result = testSetup.SetLine("void MapPoint(double latitude, double longtitude) const;").GetResult(); assert.equal("/**\n * @brief \n * \n * @param latitude \n * @param longtitude \n */", result); |