Project

General

Profile

« Previous | Next » 

Revision 69c8d06c

Added by Pierre-Loïc Garoche over 6 years ago

[EMF] protect more field

View differences:

src/backends/EMF/EMF_backend.ml
222 222
	(* Thanks to normalization, vl shall only contain constant or
223 223
	   local/state vars but not calls to other functions *)
224 224
	fprintf fmt "\"kind\": \"operator\",@ ";
225
	fprintf fmt "\"lhs\": \"%a\",@ " Printers.pp_var_name lhs;
225
	fprintf fmt "\"lhs\": \"%a\",@ " pp_var_name lhs;
226 226
	fprintf fmt "\"name\": \"%s\",@ \"args\": [@[%a@]]"
227 227
	  fun_id
228 228
	  pp_emf_cst_or_var_list vl
......
232 232
      | LocalVar _
233 233
      | StateVar _ -> (
234 234
	fprintf fmt "\"kind\": \"local_assign\",@ \"lhs\": \"%a\",@ \"rhs\": %a"
235
	  Printers.pp_var_name lhs
235
	  pp_var_name lhs
236 236
	  pp_emf_cst_or_var expr
237 237
      ))    )
238 238

  
......
240 240
			       variable or a constant, no function anymore! *)
241 241
    -> (
242 242
      fprintf fmt "\"kind\": \"pre\",@ \"lhs\": \"%a\",@ \"rhs\": %a"
243
	Printers.pp_var_name lhs
243
	pp_var_name lhs
244 244
	pp_emf_cst_or_var expr
245 245
    )
246 246
     
......
313 313
      print_protect (fun fmt -> pp_print_string fmt (node_f.node_id)) 
314 314
      f;
315 315
    fprintf fmt "\"lhs\": [@[%a@]],@ \"args\": [@[%a@]]"
316
      (fprintf_list ~sep:",@ " (fun fmt v -> fprintf fmt "\"%a\"" Printers.pp_var_name v)) outputs
316
      (fprintf_list ~sep:",@ " (fun fmt v -> fprintf fmt "\"%a\"" pp_var_name v)) outputs
317 317
      pp_emf_cst_or_var_list inputs;
318 318
    if is_stateful then fprintf fmt ",@ \"reset\": \"%s\"" (reset_name f) else fprintf fmt "@ "
319 319
  )

Also available in: Unified diff