Type checking for pure expressions.

This commit is contained in:
chriseth
2017-03-13 13:30:21 +01:00
parent bde913f088
commit f39763e91c
5 changed files with 88 additions and 28 deletions
+2
View File
@@ -156,6 +156,8 @@ struct ExpressionAnnotation: ASTAnnotation
TypePointer type;
/// Whether the expression is a constant variable
bool isConstant = false;
/// Whether the expression is pure, i.e. compile-time constant.
bool isPure = false;
/// Whether it is an LValue (i.e. something that can be assigned to).
bool isLValue = false;
/// Whether the expression is used in a context where the LValue is actually required.