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 b9f4294..c278d59 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 + | Const of string * string * ast_row | Foreign of string * string * string * ast_row (* parent, row, child_name, row *) | End @@ -19,6 +20,9 @@ let rec print_row = function | Uuidv4 (s, r) -> printf "UUIDv4(%s)," s; print_row r + | Const (s, v, r) -> + printf "Const(%s, %s)," s v; + print_row r | Foreign (p, r, c, next_row) -> printf "Foreign(%s.%s, %s)," p r c; print_row next_row @@ -60,6 +64,7 @@ let rec ast_row_to_fixtures = function 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 + | Const (s, v, r) -> PRow (Fixture.Const (s, v)) :: ast_row_to_fixtures r | End -> [] |