|
@@ -85,11 +85,14 @@ let type_function_arg_value ctx t c do_display =
|
|
in
|
|
in
|
|
loop e
|
|
loop e
|
|
|
|
|
|
|
|
+let process_function_arg ctx n t c do_display p =
|
|
|
|
+ if starts_with n '$' then error "Function argument names starting with a dollar are not allowed" p;
|
|
|
|
+ type_function_arg_value ctx t c do_display
|
|
|
|
+
|
|
let type_function ctx args ret fmode f do_display p =
|
|
let type_function ctx args ret fmode f do_display p =
|
|
let fargs = List.map2 (fun (n,c,t) ((_,pn),_,m,_,_) ->
|
|
let fargs = List.map2 (fun (n,c,t) ((_,pn),_,m,_,_) ->
|
|
- if starts_with n '$' then error "Function argument names starting with a dollar are not allowed" p;
|
|
|
|
- let c = type_function_arg_value ctx t c do_display in
|
|
|
|
- let v,c = add_local_with_origin ctx TVOArgument n t pn , c in
|
|
|
|
|
|
+ let c = process_function_arg ctx n t c do_display pn in
|
|
|
|
+ let v = add_local_with_origin ctx TVOArgument n t pn in
|
|
v.v_meta <- v.v_meta @ m;
|
|
v.v_meta <- v.v_meta @ m;
|
|
if do_display && DisplayPosition.encloses_display_position pn then
|
|
if do_display && DisplayPosition.encloses_display_position pn then
|
|
DisplayEmitter.display_variable ctx v pn;
|
|
DisplayEmitter.display_variable ctx v pn;
|