Update return type in code generator and add tests for logical functions

Change-Id: I128f8ccc21c2c3a2c79674ac28dd9a5b26b58772
This commit is contained in:
Darius Rueckert
2019-12-09 17:36:27 +01:00
parent 5010421bb7
commit 848c1f90c0
6 changed files with 71 additions and 32 deletions
@@ -102,9 +102,6 @@ class CodeGenerator {
// If the expression does not have a valid name an error is generated.
std::string VariableForExpressionId(ExpressionId id);
// Returns the type as a string of the left hand side.
static std::string DataTypeForExpression(ExpressionType type);
// Adds one level of indentation. Called when an IF expression is encountered.
void PushIndentation();
@@ -249,6 +249,8 @@ enum class ExpressionReturnType {
VOID,
};
std::string ExpressionReturnTypeToString(ExpressionReturnType type);
// This class contains all data that is required to generate one line of code.
// Each line has the following form:
//