diff options
Diffstat (limited to 'lib/ast_types.ml')
-rw-r--r-- | lib/ast_types.ml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ast_types.ml b/lib/ast_types.ml index 1c5de60..7b4f445 100644 --- a/lib/ast_types.ml +++ b/lib/ast_types.ml @@ -4,6 +4,7 @@ module Fixture = Fixture type ast_row = | Uuidv4 of string * ast_row | Name of string * ast_row + | Int of string * int * int * ast_row | Foreign of string * string * string * ast_row (* parent, row, child_name, row *) | End @@ -21,6 +22,9 @@ let rec print_row = function | Foreign (p, r, c, next_row) -> printf "Foreign(%s.%s, %s)," p r c; print_row next_row + | Int (s, min, max, r) -> + printf "Int(%s, %d, %d)," s min max; + print_row r | Name (s, r) -> printf "Name(%s)," s; print_row r @@ -55,6 +59,7 @@ let rec ast_row_to_fixtures = function | Foreign (p, r, c, next_row) -> CRow (p, r, fun l -> Fixture.Foreign (c, l)) :: ast_row_to_fixtures next_row | Name (s, r) -> PRow (Fixture.Name s) :: ast_row_to_fixtures r + | Int (s, min, max, r) -> PRow (Fixture.Int (s, min, max)) :: ast_row_to_fixtures r | End -> [] |