Project

General

Profile

Revision d77323b8 src/tools/importer/vhdl_json_lib.ml

View differences:

src/tools/importer/vhdl_json_lib.ml
163 163
    `List ((map_all (f hd) f)::(map_list map_all tl f))
164 164
  | x -> x
165 165

  
166
let numeric_literal_simpl json =
167
  match json with
168
  | `Assoc (("NUMERIC_LITERAL", `Assoc (("TOKEN", `Assoc (("text", `String(x))::[]))::[]))::[]) -> `String (x)
169
  | x -> x
170

  
171
let flatten_numeric_literal json =
172
  map_all json (numeric_literal_simpl)
173

  
166 174
let to_list_str str json =
167 175
  map_all json (assoc_elem_as_list str)
168 176

  
......
199 207
    | `List (hd::tl) ->
200 208
      List.append (print_depth hd depth indent)
201 209
                  (print_depth (`List (tl)) depth indent)
210
    | `String (s) -> (indent^s)::[]
202 211
    | _ -> []
203 212
  else
204 213
    []

Also available in: Unified diff