1 /** 
2  * Defines a value that is part
3  * of a result
4  */
5 module guillotine.value;
6 
7 /** 
8  * Represents a void value
9  */
10 public struct Empty {}
11 
12 /** 
13  * Union defining the allocated space
14  * for the value
15  */
16 public union ValueUnion
17 {
18     Object object;
19     int integer;
20     uint uinteger;
21     float floating;
22     bool boolean;
23     string str;
24     Empty none;
25 }
26 
27 /** 
28  * The value wrapper around the `ValueUnion`
29  * union
30  */
31 public struct Value
32 {
33     /** 
34      * The actual value in union
35      * format
36      */
37     public ValueUnion value;
38 
39     // TODO: COme back to this
40     private this(Object value)
41     {
42         this.value.object = value;
43     }
44 
45     // TODO: COme back to this and types
46     private this(int integer)
47     {
48         
49     }
50     
51     // TODO: COme back to this and types
52     private this(uint uinteger)
53     {
54         this.value.uinteger = uinteger;
55     }
56 }