summaryrefslogtreecommitdiff
path: root/src/Expressions.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/Expressions.ml')
-rw-r--r--src/Expressions.ml23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/Expressions.ml b/src/Expressions.ml
index d8fe8d78..cd0a08ab 100644
--- a/src/Expressions.ml
+++ b/src/Expressions.ml
@@ -4,23 +4,22 @@ open Values
type field_proj_kind =
| Adt of TypeDefId.id * VariantId.id option
| Tuple of int
-[@@deriving of_yojson]
+[@@deriving yojson]
type projection_elem =
| Deref
| DerefBox
| Field of field_proj_kind * FieldId.id
| Downcast of VariantId.id
-[@@deriving of_yojson]
+[@@deriving yojson]
-type projection = projection_elem list [@@deriving of_yojson]
+type projection = projection_elem list [@@deriving yojson]
-type place = { var_id : VarId.id; projection : projection }
-[@@deriving of_yojson]
+type place = { var_id : VarId.id; projection : projection } [@@deriving yojson]
-type borrow_kind = Shared | Mut | TwoPhaseMut [@@deriving of_yojson]
+type borrow_kind = Shared | Mut | TwoPhaseMut [@@deriving yojson]
-type unop = Not | Neg [@@deriving of_yojson]
+type unop = Not | Neg [@@deriving yojson]
(** A binary operation
@@ -46,7 +45,7 @@ type binop =
| Mul
| Shl
| Shr
-[@@deriving of_yojson]
+[@@deriving yojson]
(** Constant value for an operand
@@ -65,16 +64,16 @@ type operand_constant_value =
| ConstantValue of constant_value
| Adt of TypeDefId.id
| Unit
-[@@deriving of_yojson]
+[@@deriving yojson]
type operand =
| Copy of place
| Move of place
| Constant of ety * operand_constant_value
-[@@deriving of_yojson]
+[@@deriving yojson]
type aggregate_kind = Tuple | Adt of TypeDefId.id * VariantId.id list
-[@@deriving of_yojson]
+[@@deriving yojson]
type rvalue =
| Use of operand
@@ -83,4 +82,4 @@ type rvalue =
| BinaryOp of binop * operand * operand
| Discriminant of place
| Aggregate of aggregate_kind * operand list
-[@@deriving of_yojson]
+[@@deriving yojson]