Skip to content

Commit

Permalink
!fixup better clearing of params list
Browse files Browse the repository at this point in the history
  • Loading branch information
Histalek committed Oct 1, 2024
1 parent 2e67c75 commit 8522135
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions source/FileParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ public void Process()
{
string line = Lines[CurrentLineCount];

if (string.IsNullOrEmpty(line)) // ignore empty lines
if (string.IsNullOrEmpty(line))
{
// There shouldn't be empty lines between docs and their datastructure
// we therefore discard the params list here.
paramsList.Clear();
continue;
}

// if this line is not a comment it means the doc comment section has ended
// and we should now be able to find a datastructure.
Expand All @@ -99,11 +104,9 @@ public void Process()
{
CurrentMatchedLines = counter;
dataStructure.Initialize(this);
paramsList.Clear();
}

// cleans the params list to be used for the next function or whatever, even if there is no dataStructure match
paramsList.Clear();

continue;
}

Expand Down

0 comments on commit 8522135

Please sign in to comment.