ajout Tuple et dereference
This commit is contained in:
parent
2961872f99
commit
7842d4dc14
1 changed files with 7 additions and 6 deletions
|
@ -381,9 +381,10 @@ and expression _pos environment _memory = function
|
||||||
| Field _ ->
|
| Field _ ->
|
||||||
(* TODO *)
|
(* TODO *)
|
||||||
failwith "Students! This is your job (Field)!"
|
failwith "Students! This is your job (Field)!"
|
||||||
| Tuple _ ->
|
| Tuple([]) -> (* Cas pour le Tuple vide *)
|
||||||
(* TODO *)
|
VUnit (* Un tuple vide ne contient rien (logique), donc on utilise un VUnit*)
|
||||||
failwith "Students! This is your job (Tuple)!"
|
| Tuple(list_exp) ->
|
||||||
|
VTuple(List.map (expression' environment _memory) list_exp)
|
||||||
| Sequence _ ->
|
| Sequence _ ->
|
||||||
(* TODO *)
|
(* TODO *)
|
||||||
failwith "Students! This is your job (Sequence)!"
|
failwith "Students! This is your job (Sequence)!"
|
||||||
|
@ -396,9 +397,9 @@ and expression _pos environment _memory = function
|
||||||
| Apply _ ->
|
| Apply _ ->
|
||||||
(* TODO *)
|
(* TODO *)
|
||||||
failwith "Students! This is your job (Apply)!"
|
failwith "Students! This is your job (Apply)!"
|
||||||
| Ref _ ->
|
| Ref ref ->
|
||||||
(* TODO *)
|
let dref = expression' environment _memory ref in
|
||||||
failwith "Students! This is your job (Ref)!"
|
VLocation(Memory.allocate _memory Mint.one dref)
|
||||||
| Assign _ ->
|
| Assign _ ->
|
||||||
(* TODO *)
|
(* TODO *)
|
||||||
failwith "Students! This is your job (Assign)!"
|
failwith "Students! This is your job (Assign)!"
|
||||||
|
|
Reference in a new issue