aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-29 20:06:09 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-29 20:06:09 -0400
commit05515d8645326efa3db6311f6be1be776452c68a (patch)
tree15e58e72fc1aeec61017f02d8bf555e38a8dfda3 /types.c
parent8f7f66d7c894544c7c7e8ffae5d74e3cc602256f (diff)
Add DateTime
Diffstat (limited to 'types.c')
-rw-r--r--types.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/types.c b/types.c
index c1862e07..024e4289 100644
--- a/types.c
+++ b/types.c
@@ -25,6 +25,7 @@ CORD type_to_cord(type_t *t) {
case BoolType: return "Bool";
case ByteType: return "Byte";
case CStringType: return "CString";
+ case DateTimeType: return "DateTime";
case TextType: return Match(t, TextType)->lang ? Match(t, TextType)->lang : "Text";
case BigIntType: return "Int";
case IntType: return CORD_asprintf("Int%d", Match(t, IntType)->bits);
@@ -405,6 +406,7 @@ PUREFUNC size_t type_size(type_t *t)
case BoolType: return sizeof(bool);
case ByteType: return sizeof(uint8_t);
case CStringType: return sizeof(char*);
+ case DateTimeType: return sizeof(DateTime_t);
case BigIntType: return sizeof(Int_t);
case IntType: {
switch (Match(t, IntType)->bits) {
@@ -484,6 +486,7 @@ PUREFUNC size_t type_align(type_t *t)
case BoolType: return __alignof__(bool);
case ByteType: return __alignof__(uint8_t);
case CStringType: return __alignof__(char*);
+ case DateTimeType: return __alignof__(DateTime_t);
case BigIntType: return __alignof__(Int_t);
case IntType: {
switch (Match(t, IntType)->bits) {