handle files with no statements
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Lynne Megido 2020-09-27 15:57:28 +10:00
parent d91030d5ea
commit 05819824b2
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90

View file

@ -135,6 +135,11 @@ namespace BunyMuny {
Console.WriteLine(statement);
}
if (statements.Count == 0) {
Console.WriteLine("No statements found.");
return 2;
}
Console.WriteLine("Summary:");
Console.WriteLine("==================");
var summaries = statements.GroupBy(s => s.Category). // group statements by category