This repository has been archived on 2022-12-27. You can view files and clone it, but cannot push or open issues or pull requests.
compilateurMIPS/semantics.ml

12 lines
229 B
OCaml

open Ast
open Ast.IR
open Baselib
exception Error of string * Lexing.position
let rec analyze_expr expr env =
match expr with
| Syntax.Int n -> Val (Int n.value)
;;
let analyze parsed = analyze_expr parsed Baselib._types_