Skip to content

Commit

Permalink
refact(rivet/prefs): add Preferences.is_fmt: bool field
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS committed Nov 10, 2023
1 parent b087319 commit b5883c1
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions lib/rivet/src/prefs/mod.ri
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public enum OutputMode as uint8 {
}

public enum OptimizeMode as uint8 {
Debug,
Release
Debug,
Release
}

public enum LinkMode as uint8 {
Expand All @@ -59,25 +59,26 @@ public struct Prefs {
public mut mod_dir: string;
public mut mod_output: string;

// Output info
public mut output_mode: OutputMode;
public mut optimize_mode: OptimizeMode;
public mut is_test: bool;
public mut run_output: bool;
public mut run_output_args: []string;

public mut library_path: []string := [rivetcLibDir, libDir];
public mut libraries_to_link: []string;
public mut objects_to_link: []string;

public mut flags: []string;
public mut check: bool;
public mut check: bool;
public mut check_syntax: bool;
public mut emit_mir: bool;
public mut keep_c: bool;
public mut all_warns_are_errors: bool;
public mut hide_all_warns: bool;
public mut is_verbose: bool;
public mut emit_mir: bool;
public mut keep_c: bool;
public mut all_warns_are_errors: bool;
public mut hide_all_warns: bool;
public mut is_verbose: bool;
public mut is_fmt: bool;

// Output info
public mut output_mode: OutputMode;
public mut optimize_mode: OptimizeMode;
public mut is_test: bool;
public mut run_output: bool;
public mut run_output_args: []string;

public func new(args: []string, is_test: bool, run_output: bool, is_check: bool) -> !Self {
prefs := Prefs(is_test: is_test, run_output: run_output, check: is_check);
Expand Down

0 comments on commit b5883c1

Please sign in to comment.