aboutsummaryrefslogtreecommitdiff
path: root/include/number.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/number.h')
-rw-r--r--include/number.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/number.h b/include/number.h
new file mode 100644
index 0000000..a87d5fa
--- /dev/null
+++ b/include/number.h
@@ -0,0 +1,21 @@
+#ifndef AMAL_NUMBER_H
+#define AMAL_NUMBER_H
+
+#include "std/types.h"
+
+typedef enum {
+ AMAL_NUMBER_SIGNED_INTEGER,
+ AMAL_NUMBER_UNSIGNED_INTEGER,
+ AMAL_NUMBER_FLOAT
+} AmalNumberType;
+
+typedef struct {
+ union {
+ i64 integer;
+ f64 floating;
+ } value;
+ int bits;
+ AmalNumberType type;
+} AmalNumber;
+
+#endif