aboutsummaryrefslogtreecommitdiff
path: root/lib/ast_types.ml
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2023-12-26 15:46:04 -0600
committerMarc Coquand <marc@mccd.space>2023-12-26 15:46:04 -0600
commitc75ab6042f40f9101e88d41c1d41b5e41c3f12ef (patch)
treed21b6771833e07b6f4b6cb58c4fbce109485d7c8 /lib/ast_types.ml
parent508c7c9b34a892d74d087f1ef5d54d16fa000551 (diff)
downloadfixgen-c75ab6042f40f9101e88d41c1d41b5e41c3f12ef.tar.gz
fixgen-c75ab6042f40f9101e88d41c1d41b5e41c3f12ef.tar.bz2
fixgen-c75ab6042f40f9101e88d41c1d41b5e41c3f12ef.zip
Add increment type
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 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 =