72/72, fix for
This commit is contained in:
parent
b1cade7dd4
commit
d7b09be593
1 changed files with 4 additions and 3 deletions
|
@ -462,6 +462,7 @@ and case_value expr branches environment memory =
|
||||||
| [] -> error [ expr.position ] "erreur"
|
| [] -> error [ expr.position ] "erreur"
|
||||||
| _ as env -> List.hd env
|
| _ as env -> List.hd env
|
||||||
|
|
||||||
|
|
||||||
and for_value id expr1 expr2 expr3 environment memory =
|
and for_value id expr1 expr2 expr3 environment memory =
|
||||||
let borne_inf = value_as_int (expression' environment memory expr1) in
|
let borne_inf = value_as_int (expression' environment memory expr1) in
|
||||||
let borne_sup = value_as_int (expression' environment memory expr2) in
|
let borne_sup = value_as_int (expression' environment memory expr2) in
|
||||||
|
@ -481,7 +482,7 @@ and boucle_for id borne_inf borne_sup expr3 environment memory =
|
||||||
(* On lis l'identifier avec la borne inférieur *)
|
(* On lis l'identifier avec la borne inférieur *)
|
||||||
Environment.bind environment id.value (int_as_value borne_inf)
|
Environment.bind environment id.value (int_as_value borne_inf)
|
||||||
in
|
in
|
||||||
let _calcul = expression' environment memory expr3 in
|
let _calcul = expression' env' memory expr3 in
|
||||||
boucle_for id (Mint.add borne_inf Mint.one) borne_sup expr3 env' memory)
|
boucle_for id (Mint.add borne_inf Mint.one) borne_sup expr3 env' memory)
|
||||||
else VUnit (* Cas où nous ne sommes plus dans la boucle, on renvoie un VUnit *)
|
else VUnit (* Cas où nous ne sommes plus dans la boucle, on renvoie un VUnit *)
|
||||||
|
|
||||||
|
@ -605,7 +606,7 @@ and tagged_pattern cons1 cons2 pattern1 pattern2 environment =
|
||||||
|
|
||||||
|
|
||||||
and record_pattern environment r r' =
|
and record_pattern environment r r' =
|
||||||
(*)
|
|
||||||
match r with
|
match r with
|
||||||
| [] -> Some environment
|
| [] -> Some environment
|
||||||
| field :: reste ->
|
| field :: reste ->
|
||||||
|
@ -625,7 +626,7 @@ and record_pattern environment r r' =
|
||||||
| None -> record_labbel_pattern environment field reste
|
| None -> record_labbel_pattern environment field reste
|
||||||
else
|
else
|
||||||
record_labbel_pattern environment field reste
|
record_labbel_pattern environment field reste
|
||||||
*)
|
|
||||||
|
|
||||||
and literal_pattern pl environment expression =
|
and literal_pattern pl environment expression =
|
||||||
let valeur_literal = pl.value in
|
let valeur_literal = pl.value in
|
||||||
|
|
Reference in a new issue