diff options
| author | Rowan Goemans <RB.Goemans@student.han.nl> | 2017-11-05 02:12:30 +0100 |
|---|---|---|
| committer | Rowan Goemans <RB.Goemans@student.han.nl> | 2017-11-05 02:12:30 +0100 |
| commit | 9e9c6be621057be27832ba1c6b9df484702a897b (patch) | |
| tree | 4605d709eebcfa5c5d5daac7e40030dca922d6e6 | |
| parent | d1cae5c2973b2bfe5fb672c9fdd568dd90a75029 (diff) | |
| download | doxdocgen-9e9c6be621057be27832ba1c6b9df484702a897b.tar.gz | |
-- Modified parser to never return null. It will no always generate an empty doxygen comment. usable for Describing instance variables. Enum, structs etc.
| -rw-r--r-- | src/CodeParser/CParser/CParser.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/CodeParser/CParser/CParser.ts b/src/CodeParser/CParser/CParser.ts index 942b65f..1b4db74 100644 --- a/src/CodeParser/CParser/CParser.ts +++ b/src/CodeParser/CParser/CParser.ts @@ -113,11 +113,11 @@ export default class CParser implements ICodeParser { this.activeEditor = activeEdit; this.activeSelection = this.activeEditor.selection.active; - let line: string; + let line: string = ""; try { line = this.getLogicalLine(); } catch (err) { - return null; + // console.dir(err); } // template parsing is simpler by using heuristics rather then tokenizing first. @@ -126,7 +126,7 @@ export default class CParser implements ICodeParser { line = line.slice(template.length, line.length + 1).trim(); - let retAndArgs: string[][]; + let retAndArgs: string[][] = [[], []]; try { retAndArgs = this.GetReturnAndArgs(line); } catch (err) { @@ -143,6 +143,7 @@ export default class CParser implements ICodeParser { templateArgs, retVals, ); + return cppGenerator; } |