1 /// Author: Aziz Köksal
2 /// License: GPL3
3 /// $(Maturity high)
4 module dil.code.NotAResult;
5 
6 import dil.ast.Expression;
7 import dil.semantic.Types;
8 
9 /// Not A Result. Similar to NAN in floating point arithmetics.
10 class NARExpr : Expression
11 {
12   override NARExpr copy(){ return this; }
13 }
14 
15 /// A global, unique instance.
16 /// Returned when an expression could not be interpreted at compile-time.
17 NARExpr NAR = null;
18 
19 static this()
20 {
21   NAR = new NARExpr;
22   NAR.type = Types.Error; // Giving it a type may not be necessary.
23 }