summaryrefslogtreecommitdiff
path: root/src/main.ml
diff options
context:
space:
mode:
authorSon Ho2021-11-17 16:30:57 +0100
committerSon Ho2021-11-17 16:30:57 +0100
commitdabf9836f8bf59d4590e4bef126299492c9b53de (patch)
tree15b01173bbd98f1baad08e8c11a6eae5ce758345 /src/main.ml
parent2903cd956575624313d29e1a3ecd1abcbaab4dc3 (diff)
Start implementing by hand the json deserializers
Diffstat (limited to 'src/main.ml')
-rw-r--r--src/main.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.ml b/src/main.ml
index ce0a9269..7f130949 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -1,5 +1,6 @@
open Types
open CfimAst
+open CfimOfJson
type declaration =
| Type of TypeDefId.id
@@ -24,6 +25,9 @@ let () =
let e1 = Statement Return in
let e1_json = expression_to_yojson e1 in
print_endline (Yojson.Safe.to_string e1_json);
+ let int_ty = Isize in
+ let int_ty_json = integer_type_to_yojson int_ty in
+ print_endline (Yojson.Safe.to_string int_ty_json);
let json2 = Yojson.Safe.from_string "[\"Return\"]" in
match statement_of_yojson json2 with
| Error s -> Printf.printf "error: %s\n" s