Project

General

Profile

« Previous | Next » 

Revision ec031ed0

Added by Arnaud Dieumegard almost 6 years ago

Added support for declarative items

View differences:

src/backends/VHDL/vhdl_ast_map.ml
23 23
let _ = fun (_ : vhdl_case_item_t)  -> () 
24 24
let _ = fun (_ : vhdl_declaration_t)  -> () 
25 25
let _ = fun (_ : vhdl_signal_selection_t)  -> () 
26
let _ = fun (_ : vhdl_declarative_item_t)  -> () 
26 27
let _ = fun (_ : vhdl_signal_condition_t)  -> () 
27 28
let _ = fun (_ : vhdl_conditional_signal_t)  -> () 
28 29
let _ = fun (_ : vhdl_process_t)  -> () 
......
63 64
    method virtual  vhdl_suffix_selection_t : vhdl_suffix_selection_t -> vhdl_suffix_selection_t
64 65
    method virtual  vhdl_declaration_t : vhdl_declaration_t -> vhdl_declaration_t
65 66
    method virtual  vhdl_sequential_stmt_t : vhdl_sequential_stmt_t -> vhdl_sequential_stmt_t
67
    method virtual  vhdl_declarative_item_t : vhdl_declarative_item_t -> vhdl_declarative_item_t
66 68
    method virtual  vhdl_signal_condition_t : vhdl_signal_condition_t -> vhdl_signal_condition_t
67 69
    method virtual  vhdl_cst_val_t : vhdl_cst_val_t -> vhdl_cst_val_t
68 70
    method virtual  vhdl_subprogram_spec_t : vhdl_subprogram_spec_t -> vhdl_subprogram_spec_t
......
380 382
            let stmts = self#list self#vhdl_sequential_stmt_t stmts  in
381 383
            Subprogram { name; kind; spec; decl_part; stmts }
382 384

  
385
    method vhdl_declarative_item_t :
386
      vhdl_declarative_item_t -> vhdl_declarative_item_t=
387
      fun { use_clause; declaration; definition }  ->
388
        let use_clause = self#option self#vhdl_load_t use_clause  in
389
        let declaration = self#option self#vhdl_declaration_t declaration  in
390
        let definition = self#option self#vhdl_definition_t definition  in
391
        { use_clause; declaration; definition }
392

  
383 393
    method vhdl_signal_condition_t : vhdl_signal_condition_t -> vhdl_signal_condition_t=
384 394
      fun { expr; cond }  ->
385 395
        let expr = self#list self#vhdl_expr_t expr  in
......
406 416
    method vhdl_process_t : vhdl_process_t -> vhdl_process_t=
407 417
      fun { id; declarations; active_sigs; body }  ->
408 418
        let id = self#vhdl_name_t id  in
409
        let declarations =
410
          self#option (self#list self#vhdl_declaration_t) declarations  in
419
        let declarations = self#list self#vhdl_declarative_item_t declarations  in
411 420
        let active_sigs = self#list self#vhdl_name_t active_sigs  in
412 421
        let body = self#list self#vhdl_sequential_stmt_t body  in
413 422
        { id; declarations; active_sigs; body }
......
474 483
        | Use a -> let a = self#list self#vhdl_name_t a  in Use a
475 484

  
476 485
    method vhdl_architecture_t : vhdl_architecture_t -> vhdl_architecture_t=
477
      fun { name; entity; use_clauses; declarations; body }  ->
486
      fun { name; entity; declarations; body }  ->
478 487
        let name = self#vhdl_name_t name  in
479 488
        let entity = self#vhdl_name_t entity  in
480
        let use_clauses = self#list self#vhdl_load_t use_clauses  in
481
        let declarations = self#list self#vhdl_declaration_t declarations  in
489
        let declarations = self#list self#vhdl_declarative_item_t declarations  in
482 490
        let body = self#list self#vhdl_concurrent_stmt_t body  in
483
        { name; entity; use_clauses; declarations; body }
491
        { name; entity; declarations; body }
484 492

  
485 493
    method vhdl_configuration_t :
486 494
      vhdl_configuration_t -> vhdl_configuration_t= self#unit

Also available in: Unified diff