1 |
d3f0059e
|
Arnaud Dieumegard
|
open Vhdl_ast_map
|
2 |
40364f53
|
Arnaud Dieumegard
|
open Vhdl_to_lustre
|
3 |
|
|
open Vhdl_ast_deriving
|
4 |
d3f0059e
|
Arnaud Dieumegard
|
open Ppxlib_traverse_builtins
|
5 |
|
|
|
6 |
|
|
let any x = x
|
7 |
|
|
|
8 |
|
|
let replace_op_expr = object (self)
|
9 |
|
|
inherit Ppxlib_traverse_builtins.map
|
10 |
|
|
inherit vhdl_map as super
|
11 |
|
|
|
12 |
|
|
method unit: unit T.map = any
|
13 |
|
|
|
14 |
|
|
method vhdl_expr_t = function
|
15 |
|
|
| Op ({id=""; args=hd::[]}) -> self#vhdl_expr_t hd
|
16 |
|
|
| x -> super#vhdl_expr_t x
|
17 |
|
|
end
|
18 |
|
|
|
19 |
40364f53
|
Arnaud Dieumegard
|
let to_lustre = object (self)
|
20 |
|
|
inherit Ppxlib_traverse_builtins.map
|
21 |
|
|
inherit vhdl_to_lustre_map as super
|
22 |
|
|
|
23 |
|
|
method unit: unit T.map = any
|
24 |
|
|
end
|