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:
|
case ParsedStatementKind::Bad:
|
||||||
return new BoundBadStatement();
|
return new BoundBadStatement();
|
||||||
}
|
}
|
||||||
|
throw "unreachable";
|
||||||
}
|
}
|
||||||
|
|
||||||
BoundStatement *Binder::BindBlockStatement(const ParsedStatement *statement) {
|
BoundStatement *Binder::BindBlockStatement(const ParsedStatement *statement) {
|
||||||
|
@ -355,6 +356,7 @@ namespace Porygon::Binder {
|
||||||
case ParsedExpressionKind::Bad:
|
case ParsedExpressionKind::Bad:
|
||||||
return new BoundBadExpression(expression->GetStartPosition(), expression->GetLength());
|
return new BoundBadExpression(expression->GetStartPosition(), expression->GetLength());
|
||||||
}
|
}
|
||||||
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
BoundExpression *Binder::BindVariableExpression(const VariableExpression *expression) {
|
BoundExpression *Binder::BindVariableExpression(const VariableExpression *expression) {
|
||||||
|
|
|
@ -266,11 +266,7 @@ namespace Porygon::Evaluation {
|
||||||
case BoundExpressionKind::PeriodIndex:
|
case BoundExpressionKind::PeriodIndex:
|
||||||
return dynamic_pointer_cast<NumericEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
return dynamic_pointer_cast<NumericEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
||||||
|
|
||||||
case BoundExpressionKind::LiteralString:
|
default:
|
||||||
case BoundExpressionKind::LiteralBool:
|
|
||||||
case BoundExpressionKind::Bad:
|
|
||||||
case BoundExpressionKind::NumericalTable:
|
|
||||||
case BoundExpressionKind::Table:
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -293,12 +289,7 @@ namespace Porygon::Evaluation {
|
||||||
case BoundExpressionKind::PeriodIndex:
|
case BoundExpressionKind::PeriodIndex:
|
||||||
return dynamic_pointer_cast<BooleanEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
return dynamic_pointer_cast<BooleanEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
||||||
|
|
||||||
case BoundExpressionKind::Bad:
|
default:
|
||||||
case BoundExpressionKind::LiteralInteger:
|
|
||||||
case BoundExpressionKind::LiteralFloat:
|
|
||||||
case BoundExpressionKind::LiteralString:
|
|
||||||
case BoundExpressionKind::NumericalTable:
|
|
||||||
case BoundExpressionKind::Table:
|
|
||||||
throw;
|
throw;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -319,13 +310,7 @@ namespace Porygon::Evaluation {
|
||||||
case BoundExpressionKind::PeriodIndex:
|
case BoundExpressionKind::PeriodIndex:
|
||||||
return dynamic_pointer_cast<StringEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
return dynamic_pointer_cast<StringEvalValue>(this->EvaluatePeriodIndexExpression(expression));
|
||||||
|
|
||||||
case BoundExpressionKind::Bad:
|
default:
|
||||||
case BoundExpressionKind::LiteralInteger:
|
|
||||||
case BoundExpressionKind::LiteralFloat:
|
|
||||||
case BoundExpressionKind::LiteralBool:
|
|
||||||
case BoundExpressionKind::Unary:
|
|
||||||
case BoundExpressionKind::NumericalTable:
|
|
||||||
case BoundExpressionKind::Table:
|
|
||||||
throw;
|
throw;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Porygon::Evaluation {
|
||||||
return make_shared<IntegerEvalValue>(-l);
|
return make_shared<IntegerEvalValue>(-l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case BoundUnaryOperation::LogicalNegation:
|
default:
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ namespace Porygon::Evaluation {
|
||||||
bool b = val->EvaluateBool();
|
bool b = val->EvaluateBool();
|
||||||
return make_shared<BooleanEvalValue>(!b);
|
return make_shared<BooleanEvalValue>(!b);
|
||||||
}
|
}
|
||||||
case BoundUnaryOperation::Negation:
|
default:
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue