Project

General

Profile

Revision 248eb65e src/backends/VHDL/vhdl_ast_map.ml

View differences:

src/backends/VHDL/vhdl_ast_map.ml
2 2

  
3 3
let _ = fun (_ : vhdl_cst_val_t)  -> () 
4 4
let _ = fun (_ : vhdl_type_t)  -> () 
5
let _ = fun (_ : vhdl_element_declaration_t)  -> () 
5 6
let _ = fun (_ : vhdl_subtype_indication_t)  -> () 
6 7
let _ = fun (_ : vhdl_discrete_range_t)  -> () 
7 8
let _ = fun (_ : vhdl_constraint_t)  -> () 
......
53 54
    method virtual  vhdl_port_t : vhdl_port_t -> vhdl_port_t
54 55
    method virtual  vhdl_expr_t : vhdl_expr_t -> vhdl_expr_t
55 56
    method virtual  vhdl_port_mode_t : vhdl_port_mode_t -> vhdl_port_mode_t
57
    method virtual  vhdl_element_declaration_t : vhdl_element_declaration_t -> vhdl_element_declaration_t
56 58
    method virtual  vhdl_subtype_indication_t : vhdl_subtype_indication_t -> vhdl_subtype_indication_t
57 59
    method virtual  vhdl_conditional_signal_t : vhdl_conditional_signal_t -> vhdl_conditional_signal_t
58 60
    method virtual  vhdl_process_t : vhdl_process_t -> vhdl_process_t
......
94 96
            let b = self#int b  in let c = self#int c  in Range (a, b, c)
95 97
        | Bit_vector (a,b) ->
96 98
            let a = self#int a  in let b = self#int b  in Bit_vector (a, b)
97
        | Array (a,b,c) ->
98
            let a = self#int a  in
99
            let b = self#int b  in
100
            let c = self#vhdl_type_t c  in Array (a, b, c)
101
        | Enumerated a -> let a = self#list self#string a  in Enumerated a
99
        | Array { indexes; const; definition } ->
100
            let indexes = self#list self#vhdl_name_t indexes  in
101
            let const = self#option self#vhdl_constraint_t const  in
102
            let definition = self#vhdl_subtype_indication_t definition  in
103
            Array { indexes; const; definition }
104
        | Record a ->
105
            let a = self#list self#vhdl_element_declaration_t a  in Record a
106
        | Enumerated a ->
107
            let a = self#list self#vhdl_name_t a  in Enumerated a
102 108
        | Void  -> Void
109
    method vhdl_element_declaration_t :
110
      vhdl_element_declaration_t -> vhdl_element_declaration_t=
111
      fun { names; definition }  ->
112
        let names = self#list self#vhdl_name_t names  in
113
        let definition = self#vhdl_subtype_indication_t definition  in
114
        { names; definition }
103 115
    method vhdl_subtype_indication_t :
104 116
      vhdl_subtype_indication_t -> vhdl_subtype_indication_t=
105 117
      fun { name; functionName; const }  ->
......
442 454
        { name; generics; ports; declaration; stmts }
443 455

  
444 456
    method vhdl_package_t : vhdl_package_t -> vhdl_package_t=
445
      fun { name; shared_defs }  ->
457
      fun { name; shared_defs; shared_decls }  ->
446 458
        let name = self#vhdl_name_t name  in
447 459
        let shared_defs = self#list self#vhdl_definition_t shared_defs  in
448
        { name; shared_defs }
460
        let shared_decls = self#list self#vhdl_declaration_t shared_decls  in
461
        { name; shared_defs; shared_decls }
449 462

  
450 463
    method vhdl_load_t : vhdl_load_t -> vhdl_load_t=
451 464
      fun x  ->

Also available in: Unified diff