diff options
| author | Rowan Goemans <RB.Goemans@student.han.nl> | 2017-11-05 02:12:30 +0100 |
|---|---|---|
| committer | Christoph Schlosser <christophschlosser@users.noreply.github.com> | 2017-11-05 18:45:08 +0100 |
| commit | cac40a311576ed679715a614bd64c3d7a05ab5fb (patch) | |
| tree | 4605d709eebcfa5c5d5daac7e40030dca922d6e6 /src/CodeParser/CParser/CParser.ts | |
| parent | 3ebbc6d87cca65c2175266ae4b525a8ae6f8739b (diff) | |
| download | doxdocgen-cac40a311576ed679715a614bd64c3d7a05ab5fb.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.
Diffstat (limited to 'src/CodeParser/CParser/CParser.ts')
| -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; } |