blob: 6942382e238472e63e8e8d3d0c514102380123c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
open Fixgen
let parse (s : string) =
let lexbuf = Lexing.from_string s in
let ast = Parser.prog Lexer.read lexbuf in
ast
let () =
let result = parse "user: id uuidv4, uh uuidv4\npurchases: id uuidv4, pid user.id" in
match result with
| Some ast ->
Ast_types.compile ast ~amount:4
|> List.iter (fun (name, file) ->
let result = Fixture.csv_of_generated_fixtures file in
print_endline ("FILE NAME: " ^ name);
print_endline result)
| None -> print_endline "error"
|