Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / backends / VHDL / vhdl_ast_utils.ml @ 40364f53

History | View | Annotate | Download (511 Bytes)

1
open Vhdl_ast_map
2
open Vhdl_to_lustre
3
open Vhdl_ast_deriving
4
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
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