From 8522135ca2b671046de38b685bb5ea7c5c230854 Mon Sep 17 00:00:00 2001 From: Histalek <16392835+Histalek@users.noreply.github.com> Date: Tue, 1 Oct 2024 22:22:05 +0200 Subject: [PATCH] !fixup better clearing of params list --- source/FileParser.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/FileParser.cs b/source/FileParser.cs index 8b3e59b..07e9c17 100644 --- a/source/FileParser.cs +++ b/source/FileParser.cs @@ -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. @@ -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; }