aboutsummaryrefslogtreecommitdiffstats
path: root/lib/drl/ast.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-03-08 20:36:31 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-03-08 20:36:31 -0300
commite10acd09faf53c636b653c4df034716545db5fab (patch)
tree570d34526016df383a4b1821d9fe1dc864ef0c16 /lib/drl/ast.ml
parent99ac1e7d9b77d69f2a85a108468d4433953d8269 (diff)
downloadSakura-e10acd09faf53c636b653c4df034716545db5fab.tar.gz
Sakura-e10acd09faf53c636b653c4df034716545db5fab.zip
dml and dcl
Diffstat (limited to 'lib/drl/ast.ml')
-rw-r--r--lib/drl/ast.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/drl/ast.ml b/lib/drl/ast.ml
index f94965d..2beb010 100644
--- a/lib/drl/ast.ml
+++ b/lib/drl/ast.ml
@@ -8,6 +8,13 @@ type value =
| Bool of bool
[@@deriving sexp]
+(** Convert an AST value to an AbstractValue.t (Obj.t) via Obj.repr *)
+let value_to_abstract : value -> Conventions.AbstractValue.t = function
+ | Int n -> Obj.repr n
+ | Float f -> Obj.repr f
+ | Str s -> Obj.repr s
+ | Bool b -> Obj.repr b
+
type direction = Asc | Desc
[@@deriving sexp]