IR generation for constants.

This commit is contained in:
chriseth
2020-05-05 17:07:55 +02:00
parent 3c0ca57f21
commit 02c20698c9
9 changed files with 52 additions and 7 deletions
@@ -54,6 +54,10 @@ public:
/// Calculates expression's value and returns variable where it was stored
IRVariable evaluateExpression(Expression const& _expression, Type const& _to);
/// @returns the name of a function that computes the value of the given constant
/// and also generates the function.
std::string constantValueFunction(VariableDeclaration const& _constant);
void endVisit(VariableDeclarationStatement const& _variableDeclaration) override;
bool visit(Conditional const& _conditional) override;
bool visit(Assignment const& _assignment) override;