From c75ab6042f40f9101e88d41c1d41b5e41c3f12ef Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 26 Dec 2023 15:46:04 -0600 Subject: Add increment type --- 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 2a786f7..6a02040 100644 --- a/lib/ast_types.ml +++ b/lib/ast_types.ml @@ -5,6 +5,7 @@ type ast_row = | Uuidv4 of string * ast_row | Name of string * ast_row | Int of string * int * int * ast_row + | Increment of string * ast_row | Const of string * string * ast_row | List of string * string list * ast_row | Foreign of string * string * string * ast_row @@ -27,6 +28,9 @@ let rec print_row = function | List (s, l, r) -> printf "List(%s, %s)," s (String.concat ", " l); print_row r + | Increment (s, r) -> + printf "Increment(%s)," s; + print_row r | Const (s, v, r) -> printf "Const(%s, %s)," s v; print_row r @@ -75,6 +79,7 @@ let rec ast_row_to_fixtures = function | Int (s, min, max, r) -> PColumn (Fixture.Int (s, min, max)) :: ast_row_to_fixtures r | Const (s, v, r) -> PColumn (Fixture.Const (s, v)) :: ast_row_to_fixtures r | 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 | End -> [] let extend_table_with_row table row = -- cgit v1.2.3