Support for explicit casting
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Porygon::Binder {
|
||||
NumericalTable,
|
||||
Table,
|
||||
Require,
|
||||
ImplicitCast,
|
||||
Cast,
|
||||
};
|
||||
|
||||
class BoundExpression {
|
||||
@@ -333,10 +333,10 @@ namespace Porygon::Binder {
|
||||
}
|
||||
};
|
||||
|
||||
class BoundImplicitCastExpression : public BoundExpression {
|
||||
class BoundCastExpression : public BoundExpression {
|
||||
const BoundExpression* _expression;
|
||||
public:
|
||||
BoundImplicitCastExpression(BoundExpression* expression, shared_ptr<const ScriptType> castType)
|
||||
BoundCastExpression(BoundExpression* expression, shared_ptr<const ScriptType> castType)
|
||||
: BoundExpression(expression->GetStartPosition(), expression->GetLength(), castType),
|
||||
_expression(expression)
|
||||
{}
|
||||
@@ -345,13 +345,13 @@ namespace Porygon::Binder {
|
||||
return _expression;
|
||||
}
|
||||
|
||||
~BoundImplicitCastExpression() final {
|
||||
~BoundCastExpression() final {
|
||||
delete _expression;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
inline BoundExpressionKind GetKind() const final {
|
||||
return BoundExpressionKind::ImplicitCast;
|
||||
return BoundExpressionKind::Cast;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user