diff options
| author | gingerBill <bill@gingerbill.org> | 2021-09-09 11:06:19 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-09-09 11:06:19 +0100 |
| commit | e65e0b5db2ab9880d278555798194b875025899a (patch) | |
| tree | 13d4e370297c1f0bf720a7097ec40919e8f80ffc /src/parser.cpp | |
| parent | 56bd1e2d70a7697ea824eafc82a648982b2f19da (diff) | |
Add `-strict-style-init-only`
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index b56015dc1..e1f21f459 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -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; } |