mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-22 13:44:59 -07:00
Remove -strict-style-init-only
This commit is contained in:
@@ -325,7 +325,6 @@ struct BuildContext {
|
||||
bool disallow_do;
|
||||
|
||||
bool strict_style;
|
||||
bool strict_style_init_only;
|
||||
|
||||
bool ignore_warnings;
|
||||
bool warnings_as_errors;
|
||||
|
||||
+1
-18
@@ -679,7 +679,6 @@ enum BuildFlagKind {
|
||||
BuildFlag_DisallowDo,
|
||||
BuildFlag_DefaultToNilAllocator,
|
||||
BuildFlag_StrictStyle,
|
||||
BuildFlag_StrictStyleInitOnly,
|
||||
BuildFlag_ForeignErrorProcedures,
|
||||
BuildFlag_NoRTTI,
|
||||
BuildFlag_DynamicMapCalls,
|
||||
@@ -863,7 +862,6 @@ gb_internal bool parse_build_flags(Array<String> args) {
|
||||
add_flag(&build_flags, BuildFlag_DisallowDo, str_lit("disallow-do"), BuildFlagParam_None, Command__does_check);
|
||||
add_flag(&build_flags, BuildFlag_DefaultToNilAllocator, str_lit("default-to-nil-allocator"), BuildFlagParam_None, Command__does_check);
|
||||
add_flag(&build_flags, BuildFlag_StrictStyle, str_lit("strict-style"), BuildFlagParam_None, Command__does_check);
|
||||
add_flag(&build_flags, BuildFlag_StrictStyleInitOnly, str_lit("strict-style-init-only"), BuildFlagParam_None, Command__does_check);
|
||||
add_flag(&build_flags, BuildFlag_ForeignErrorProcedures, str_lit("foreign-error-procedures"), BuildFlagParam_None, Command__does_check);
|
||||
|
||||
add_flag(&build_flags, BuildFlag_NoRTTI, str_lit("no-rtti"), BuildFlagParam_None, Command__does_check);
|
||||
@@ -1484,20 +1482,9 @@ gb_internal bool parse_build_flags(Array<String> args) {
|
||||
case BuildFlag_ForeignErrorProcedures:
|
||||
build_context.ODIN_FOREIGN_ERROR_PROCEDURES = true;
|
||||
break;
|
||||
case BuildFlag_StrictStyle: {
|
||||
if (build_context.strict_style_init_only) {
|
||||
gb_printf_err("-strict-style and -strict-style-init-only cannot be used together\n");
|
||||
}
|
||||
case BuildFlag_StrictStyle:
|
||||
build_context.strict_style = true;
|
||||
break;
|
||||
}
|
||||
case BuildFlag_StrictStyleInitOnly: {
|
||||
if (build_context.strict_style) {
|
||||
gb_printf_err("-strict-style and -strict-style-init-only cannot be used together\n");
|
||||
}
|
||||
build_context.strict_style_init_only = true;
|
||||
break;
|
||||
}
|
||||
case BuildFlag_Short:
|
||||
build_context.cmd_doc_flags |= CmdDocFlag_Short;
|
||||
break;
|
||||
@@ -2264,10 +2251,6 @@ gb_internal void print_show_help(String const arg0, String const &command) {
|
||||
print_usage_line(2, "Errs on deprecated syntax");
|
||||
print_usage_line(0, "");
|
||||
|
||||
print_usage_line(1, "-strict-style-init-only");
|
||||
print_usage_line(2, "Same as -strict-style but only on the initial package");
|
||||
print_usage_line(0, "");
|
||||
|
||||
print_usage_line(1, "-ignore-warnings");
|
||||
print_usage_line(2, "Ignores warning messages");
|
||||
print_usage_line(0, "");
|
||||
|
||||
@@ -1602,8 +1602,6 @@ gb_internal void assign_removal_flag_to_semicolon(AstFile *f) {
|
||||
|
||||
if (build_context.strict_style || (ast_file_vet_flags(f) & VetFlag_Semicolon)) {
|
||||
syntax_error(*prev_token, "Found unneeded semicolon");
|
||||
} else if (build_context.strict_style_init_only && f->pkg->kind == Package_Init) {
|
||||
syntax_error(*prev_token, "Found unneeded semicolon");
|
||||
}
|
||||
prev_token->flags |= TokenFlag_Remove;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user