aboutsummaryrefslogtreecommitdiff
path: root/lib/ast_types.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ast_types.ml')
-rw-r--r--lib/ast_types.ml15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/ast_types.ml b/lib/ast_types.ml
index 0a4c05d..95baea5 100644
--- a/lib/ast_types.ml
+++ b/lib/ast_types.ml
@@ -11,6 +11,9 @@ type ast_row =
| List of string * string list * ast_row
| Username of string * ast_row
| Foreign of string * string * string * ast_row
+ | Past of string * ast_row
+ | Future of string * ast_row
+ | Now of string * ast_row
(* parent, row, child_name, row *)
| End
[@@deriving show, eq]
@@ -51,6 +54,15 @@ let rec print_row = function
| Email (s, r) ->
printf "Email(%s)," s;
print_row r
+ | Past (s, r) ->
+ printf "Past(%s)," s;
+ print_row r
+ | Future (s, r) ->
+ printf "Future(%s)," s;
+ print_row r
+ | Now (s, r) ->
+ printf "Now(%s)," s;
+ print_row r
| End -> printf "\n"
@@ -89,6 +101,9 @@ let rec ast_row_to_fixtures = function
| Increment (s, r) -> PColumn (Fixture.Increment s) :: ast_row_to_fixtures r
| Email (s, r) -> PColumn (Fixture.Email s) :: ast_row_to_fixtures r
| Username (s, r) -> PColumn (Fixture.Username s) :: ast_row_to_fixtures r
+ | Past (s, r) -> PColumn (Fixture.Past s) :: ast_row_to_fixtures r
+ | Future (s, r) -> PColumn (Fixture.Future s) :: ast_row_to_fixtures r
+ | Now (s, r) -> PColumn (Fixture.Now s) :: ast_row_to_fixtures r
| End -> []
let extend_table_with_row table row =