summaryrefslogtreecommitdiff
path: root/compiler/SymbolicAst.ml
diff options
context:
space:
mode:
authorSon Ho2023-11-21 14:43:12 +0100
committerSon Ho2023-11-21 14:43:12 +0100
commit77ba13b371cccbe8098e432ebd287108d5373666 (patch)
tree845bd9059f6fe94ce8c9e447104367d3a8e9d3c2 /compiler/SymbolicAst.ml
parente94cd72ffa63dbc5fc40c7c1a422c1a70ba4a7e5 (diff)
Add span information to the generated code
Diffstat (limited to 'compiler/SymbolicAst.ml')
-rw-r--r--compiler/SymbolicAst.ml13
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/SymbolicAst.ml b/compiler/SymbolicAst.ml
index c9820ba5..a9f45926 100644
--- a/compiler/SymbolicAst.ml
+++ b/compiler/SymbolicAst.ml
@@ -51,11 +51,10 @@ type call = {
}
[@@deriving show]
-(** Meta information, not necessary for synthesis but useful to guide it to
- generate a pretty output.
+(** Meta information for expressions, not necessary for synthesis but useful to
+ guide it to generate a pretty output.
*)
-
-type meta =
+type emeta =
| Assignment of Contexts.eval_ctx * mplace * typed_value * mplace option
(** We generated an assignment (destination, assigned value, src) *)
[@@deriving show]
@@ -82,7 +81,8 @@ class ['self] iter_expression_base =
fun _ _ -> ()
method visit_mplace : 'env -> mplace -> unit = fun _ _ -> ()
- method visit_meta : 'env -> meta -> unit = fun _ _ -> ()
+ method visit_emeta : 'env -> emeta -> unit = fun _ _ -> ()
+ method visit_meta : 'env -> Meta.meta -> unit = fun _ _ -> ()
method visit_region_group_id_map
: 'a. ('env -> 'a -> unit) -> 'env -> 'a region_group_id_map -> unit =
@@ -200,7 +200,7 @@ type expression =
The boolean is [is_continue].
*)
- | Meta of meta * expression (** Meta information *)
+ | Meta of emeta * expression (** Meta information *)
and loop = {
loop_id : loop_id;
@@ -215,6 +215,7 @@ and loop = {
end_expr : expression;
(** The end of the function (upon the moment it enters the loop) *)
loop_expr : expression; (** The symbolically executed loop body *)
+ meta : Meta.meta; (** Information about where the origin of the loop body *)
}
and expansion =