Fix fallthrough warnings
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
df79489d4d
commit
0d63543ff4
|
@ -56,6 +56,7 @@ namespace Porygon::Binder {
|
|||
case ParsedStatementKind::Bad:
|
||||
return new BoundBadStatement();
|
||||
}
|
||||
throw "unreachable";
|
||||
}
|
||||
|
||||
BoundStatement *Binder::BindBlockStatement(const ParsedStatement *statement) {
|
||||
|
@ -355,6 +356,7 @@ namespace Porygon::Binder {
|
|||
case ParsedExpressionKind::Bad:
|
||||
return new BoundBadExpression(expression->GetStartPosition(), expression->GetLength());
|
||||
}
|
||||
throw;
|
||||
}
|
||||
|
||||
BoundExpression *Binder::BindVariableExpression(const VariableExpression *expression) {
|
||||
|
|
|
@ -266,11 +266,7 @@ namespace Porygon::Evaluation {
|
|||
case BoundExpressionKind::PeriodIndex:
|
||||
return dynamic_pointer_cast<NumericEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
||||
|
||||
case BoundExpressionKind::LiteralString:
|
||||
case BoundExpressionKind::LiteralBool:
|
||||
case BoundExpressionKind::Bad:
|
||||
case BoundExpressionKind::NumericalTable:
|
||||
case BoundExpressionKind::Table:
|
||||
default:
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -293,12 +289,7 @@ namespace Porygon::Evaluation {
|
|||
case BoundExpressionKind::PeriodIndex:
|
||||
return dynamic_pointer_cast<BooleanEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
||||
|
||||
case BoundExpressionKind::Bad:
|
||||
case BoundExpressionKind::LiteralInteger:
|
||||
case BoundExpressionKind::LiteralFloat:
|
||||
case BoundExpressionKind::LiteralString:
|
||||
case BoundExpressionKind::NumericalTable:
|
||||
case BoundExpressionKind::Table:
|
||||
default:
|
||||
throw;
|
||||
|
||||
}
|
||||
|
@ -319,13 +310,7 @@ namespace Porygon::Evaluation {
|
|||
case BoundExpressionKind::PeriodIndex:
|
||||
return dynamic_pointer_cast<StringEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
||||
|
||||
case BoundExpressionKind::Bad:
|
||||
case BoundExpressionKind::LiteralInteger:
|
||||
case BoundExpressionKind::LiteralFloat:
|
||||
case BoundExpressionKind::LiteralBool:
|
||||
case BoundExpressionKind::Unary:
|
||||
case BoundExpressionKind::NumericalTable:
|
||||
case BoundExpressionKind::Table:
|
||||
default:
|
||||
throw;
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Porygon::Evaluation {
|
|||
return make_shared<IntegerEvalValue>(-l);
|
||||
}
|
||||
}
|
||||
case BoundUnaryOperation::LogicalNegation:
|
||||
default:
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace Porygon::Evaluation {
|
|||
bool b = val->EvaluateBool();
|
||||
return make_shared<BooleanEvalValue>(!b);
|
||||
}
|
||||
case BoundUnaryOperation::Negation:
|
||||
default:
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue