aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index f1c27328..744ac95f 100644
--- a/compile.c
+++ b/compile.c
@@ -1850,6 +1850,10 @@ CORD compile(env_t *env, ast_t *ast)
return compile_null(t);
}
case Bool: return Match(ast, Bool)->b ? "yes" : "no";
+ case DateTime: {
+ auto dt = Match(ast, DateTime)->dt;
+ return CORD_asprintf("((DateTime_t){.tv_sec=%ld, .tv_usec=%ld})", dt.tv_sec, dt.tv_usec);
+ }
case Var: {
binding_t *b = get_binding(env, Match(ast, Var)->name);
if (b)