Skip to content

Commit

Permalink
Correction d'une erreur bête.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-michel1 committed Jul 4, 2023
1 parent e23fb38 commit 8969609
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mlang/dgfip_m.ml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ let string_to_rule_domain_id : string -> Mast.DomainId.t = function
| "irisf" -> Mast.DomainId.from_list [ "irisf" ]
| "base_HR" -> Mast.DomainId.from_list [ "corrective"; "base_HR" ]
| "base_tl" -> Mast.DomainId.from_list [ "corrective"; "base_tl" ]
| "base_tl_init" -> Mast.DomainId.from_list [ "corrective"; "base_INITIAL" ]
| "base_tl_init" -> Mast.DomainId.from_list [ "corrective"; "base_tl_init" ]
| "base_tl_rect" -> Mast.DomainId.from_list [ "corrective"; "base_tl_rect" ]
| "base_INITIAL" -> Mast.DomainId.from_list [ "corrective"; "base_INITIAL" ]
| "base_INR" -> Mast.DomainId.from_list [ "corrective"; "base_INR" ]
Expand Down
7 changes: 6 additions & 1 deletion src/mlang/mpp_frontend/mpp_frontend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ let to_mpp_callable (cname : string Pos.marked) (args : string Pos.marked list)
Errors.raise_spanned_error "Expected a chain to call"
(Pos.get_position cname)
| chain :: args ->
(Program (Dgfip_m.string_to_rule_domain_id (Pos.unmark chain)), args)
let dom_id =
let ch = Pos.unmark chain in
try Dgfip_m.string_to_rule_domain_id ch
with _ -> Mast.DomainId.singleton ch
in
(Program dom_id, args)
end
| "call_m_verif" -> begin
match args with
Expand Down

0 comments on commit 8969609

Please sign in to comment.