summaryrefslogtreecommitdiffstats
path: root/src/CodeParser/CParser.ts
diff options
context:
space:
mode:
authorRowan Goemans <RB.Goemans@student.han.nl>2017-10-14 22:29:02 +0200
committerRowan Goemans <RB.Goemans@student.han.nl>2017-10-14 22:29:02 +0200
commit0ebfa5bd12e529d8febe73c85d3bf48c4d4997e8 (patch)
tree30f7d859a9270b4c70d366a93571054295b4e070 /src/CodeParser/CParser.ts
parent140229888a0e4a120c11ecaae81132d07cc69e5b (diff)
downloaddoxdocgen-0ebfa5bd12e529d8febe73c85d3bf48c4d4997e8.tar.gz
-- Added extensive templating the be able to generated different types of doxygen comment.
Diffstat (limited to 'src/CodeParser/CParser.ts')
-rw-r--r--src/CodeParser/CParser.ts19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/CodeParser/CParser.ts b/src/CodeParser/CParser.ts
index 4889de6..12ed169 100644
--- a/src/CodeParser/CParser.ts
+++ b/src/CodeParser/CParser.ts
@@ -35,8 +35,9 @@ export default class CParser implements ICodeParser {
const returnValue: string[] = this.getReturn(method);
const params: string[] = this.getParams(method);
+ const tparams: string[] = this.getTemplateParams(method);
- const cppGenerator: IDocGen = new Generator(this.activeEditor, this.activeSelection, params, returnValue);
+ const cppGenerator: IDocGen = new Generator(this.activeEditor, this.activeSelection, params, tparams, returnValue);
return cppGenerator;
}
@@ -84,7 +85,7 @@ export default class CParser implements ICodeParser {
const retVals: string[] = [];
// Remove the compiler keywords from the signature
- const sign: string = method.replace(/(static)|(inline)|(friend)|(virtual)|(extern)|(explicit)/g, "");
+ const sign: string = method.replace(/(static)|(inline)|(friend)|(virtual)|(extern)|(explicit)|(const)/g, "");
// Remove the parameters from the signature
const returnSignature = sign.slice(0, sign.indexOf("(")).trim();
@@ -106,14 +107,6 @@ export default class CParser implements ICodeParser {
break;
}
- // Don't generate return type if the user doesn't wish to do it
- if (!workspace.getConfiguration(ConfigType.generic).get<boolean>(Config.generateReturnType, true) &&
- retVals.length > 0) {
- retVals.length = 0;
- retVals.push(" ");
- return retVals;
- }
-
return retVals;
}
@@ -139,4 +132,10 @@ export default class CParser implements ICodeParser {
return paramArr;
}
+
+ protected getTemplateParams(method: string): string[] {
+ // Todo implement parsing of template parameters.
+ const tparams: string[] = [];
+ return tparams;
+ }
}