From 72ed45fc914089ac85407af4a24b01bffaad633e Mon Sep 17 00:00:00 2001 From: Guillaume Marcais Date: Thu, 27 Jul 2023 14:42:16 -0400 Subject: [PATCH 1/2] Handle properly empty yaggo file * Generate proper constructor code even if no arg or option is defined. --- lib/yaggo/parser.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/yaggo/parser.rb b/lib/yaggo/parser.rb index 9bbdd8b..986937b 100644 --- a/lib/yaggo/parser.rb +++ b/lib/yaggo/parser.rb @@ -113,10 +113,11 @@ class #{class_name} { end # Constructors and initialization - h.puts("", " #{class_name}() :") - h.puts(" " + ($options + $args).map { |o| o.init }.join(",\n "), " { }") - h.puts("", " #{class_name}(int argc, char* argv[]) :") - h.puts(" " + ($options + $args).map { |o| o.init }.join(",\n ")) + h.puts("", " #{class_name}()") + h.puts(" :" + ($options + $args).map { |o| o.init }.join("\n ,")) unless $options.empty? && $args.empty? + h.puts(" { }") + h.puts("", " #{class_name}(int argc, char* argv[])") + h.puts(" :" + ($options + $args).map { |o| o.init }.join("\n ,")) unless $options.empty? && $args.empty? h.puts(" { parse(argc, argv); }", ""); # Main arsing function From 18d01d9693606a9ab9ffd9ba0f9f6252df1b4fe5 Mon Sep 17 00:00:00 2001 From: Guillaume Marcais Date: Thu, 27 Jul 2023 14:43:49 -0400 Subject: [PATCH 2/2] Bumped version to 1.5.11 --- lib/yaggo/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/yaggo/version.rb b/lib/yaggo/version.rb index 6c4dc10..19ec45e 100644 --- a/lib/yaggo/version.rb +++ b/lib/yaggo/version.rb @@ -1 +1 @@ -$yaggo_version = "1.5.10" +$yaggo_version = "1.5.11"