Project

General

Profile

« Previous | Next » 

Revision 59b5eb05

Added by Arnaud Dieumegard almost 3 years ago

Utility vhdl_name prefixing function

View differences:

src/backends/VHDL/vhdl_ast_utils.ml
122 122
      | Simple a -> Simple (a ^ postfix)
123 123
      | Identifier a -> Identifier (a ^ postfix)
124 124
      | _ -> failwith ("Impossible to postfix name value [" ^ to_string_vhdl_name_t x ^ "]")
125
 
126 125

  
126
let prefix_flatten_vhdl_name_t: string -> vhdl_name_t -> vhdl_name_t=
127
  fun prefix -> fun postfix ->
128
  let flattened_post = flatten_vhdl_name_t postfix in
129
  match flattened_post with
130
  | Simple a -> Simple (prefix^"__"^a)
131
  | Identifier a -> Identifier (prefix^"__"^a)
132
  | _ ->  failwith ("Impossible to prefix name value [" ^ to_string_vhdl_name_t postfix ^ "]")
133
  
127 134
(*************************
128 135
 * End vhdl_name_t helpers
129 136
 *)

Also available in: Unified diff