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.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ast_types.ml b/lib/ast_types.ml
index 0cbdb4f..0a4c05d 100644
--- a/lib/ast_types.ml
+++ b/lib/ast_types.ml
@@ -9,6 +9,7 @@ type ast_row =
| Email of string * ast_row
| Const of string * string * ast_row
| List of string * string list * ast_row
+ | Username of string * ast_row
| Foreign of string * string * string * ast_row
(* parent, row, child_name, row *)
| End
@@ -26,6 +27,9 @@ let rec print_row = function
| Uuidv4 (s, r) ->
printf "UUIDv4(%s)," s;
print_row r
+ | Username (s, r) ->
+ printf "User(%s)," s;
+ print_row r
| List (s, l, r) ->
printf "List(%s, %s)," s (String.concat ", " l);
print_row r
@@ -84,6 +88,7 @@ let rec ast_row_to_fixtures = function
| List (s, l, r) -> PColumn (Fixture.List (s, l)) :: ast_row_to_fixtures r
| 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
| End -> []
let extend_table_with_row table row =