From 664b34059624d525d38da3e9e452a4bfc190a585 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 26 Dec 2023 18:26:40 -0600 Subject: Add support for username --- lib/ast_types.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/ast_types.ml') 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 = -- cgit v1.2.3