Explicitly fallthrough from inheritance parsing to body parsing, instead of implicitly.
This commit is contained in:
@@ -92,6 +92,7 @@ namespace MalachScript::Parser {
|
|||||||
if (current->GetKind() != LexTokenKind::OpenCurlyParenthesisSymbol) {
|
if (current->GetKind() != LexTokenKind::OpenCurlyParenthesisSymbol) {
|
||||||
LogError(Diagnostics::DiagnosticType::UnexpectedToken, current->GetSpan());
|
LogError(Diagnostics::DiagnosticType::UnexpectedToken, current->GetSpan());
|
||||||
}
|
}
|
||||||
|
[[fallthrough]];
|
||||||
// Intentionally don't break so we continue into the inner body statement.
|
// Intentionally don't break so we continue into the inner body statement.
|
||||||
}
|
}
|
||||||
case LexTokenKind::OpenCurlyParenthesisSymbol: {
|
case LexTokenKind::OpenCurlyParenthesisSymbol: {
|
||||||
|
|||||||
Reference in New Issue
Block a user