summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2019-09-02 15:25:44 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2019-09-02 15:47:11 +0200
commit1430c461d4a45026331663989113feb195588255 (patch)
tree2e1de04b82073d4f992eebbe4c224837ea40a04f /compiler
parentaaa657e45450e31103b1bc6fa2f2c668f23f99b6 (diff)
downloadvala-1430c461d4a45026331663989113feb195588255.tar.gz
Add boolean CodeContext.keep_going and corresponding compiler option
If keep_going is set then check() will continue after hitting errors in resolver and analyzer.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/valacompiler.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index d425202f1..c5105804a 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -75,6 +75,7 @@ class Vala.Compiler {
static bool gobject_tracing;
static bool disable_since_check;
static bool disable_warnings;
+ static bool keep_going;
static string cc_command;
[CCode (array_length = false, array_null_terminated = true)]
static string[] cc_options;
@@ -141,6 +142,7 @@ class Vala.Compiler {
{ "disable-warnings", 0, 0, OptionArg.NONE, ref disable_warnings, "Disable warnings", null },
{ "fatal-warnings", 0, 0, OptionArg.NONE, ref fatal_warnings, "Treat warnings as fatal", null },
{ "disable-since-check", 0, 0, OptionArg.NONE, ref disable_since_check, "Do not check whether used symbols exist in local packages", null },
+ { "keep-going", 'k', 0, OptionArg.NONE, ref keep_going, "Continue as much as possible after an error", null },
{ "enable-experimental-non-null", 0, 0, OptionArg.NONE, ref experimental_non_null, "Enable experimental enhancements for non-null types", null },
{ "enable-gobject-tracing", 0, 0, OptionArg.NONE, ref gobject_tracing, "Enable GObject creation tracing", null },
{ "cc", 0, 0, OptionArg.STRING, ref cc_command, "Use COMMAND as C compiler command", "COMMAND" },
@@ -233,6 +235,7 @@ class Vala.Compiler {
context.experimental = experimental;
context.experimental_non_null = experimental_non_null;
context.gobject_tracing = gobject_tracing;
+ context.keep_going = keep_going;
context.report.enable_warnings = !disable_warnings;
context.report.set_verbose_errors (!quiet_mode);
context.verbose_mode = verbose_mode;