mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 23:54:07 +00:00
Add -strict-style-init-only
This commit is contained in:
@@ -1516,6 +1516,8 @@ void assign_removal_flag_to_semicolon(AstFile *f) {
|
||||
if (ok) {
|
||||
if (build_context.strict_style) {
|
||||
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