Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/heckerpowered #13

Merged
merged 2 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Mamba/Code Analysis/Binding/BoundBinaryExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ BoundNodeKind BoundBinaryExpression::Kind() const noexcept
return BoundNodeKind::BinaryExpression;
}

NullableSharedPtr<const class BoundConstant> BoundBinaryExpression::ConstantValue() const noexcept
std::shared_ptr<const TypeSymbol> BoundBinaryExpression::Type() const noexcept
{
return Operator.Type;
}

NullableSharedPtr<const BoundConstant> BoundBinaryExpression::ConstantValue() const noexcept
{
return ConstantFolding::Fold(Left, Operator, Right);
}
13 changes: 9 additions & 4 deletions src/Mamba/Code Analysis/Binding/BoundVariableDeclaration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
using namespace Mamba;

BoundVariableDeclaration::BoundVariableDeclaration(
const std::shared_ptr<const class SyntaxNode> Syntax,
const std::shared_ptr<const class VariableSymbol> Variable,
const std::shared_ptr<const class BoundExpression> Initializer
const std::shared_ptr<const SyntaxNode> Syntax,
const std::shared_ptr<const VariableSymbol> Variable,
const std::shared_ptr<const BoundExpression> Initializer
) noexcept :
Super(Syntax), Variable(Variable), Initializer(Initializer)
{
}
}

BoundNodeKind BoundVariableDeclaration::Kind() const noexcept
{
return BoundNodeKind::VariableDeclaration;
}
Loading