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

13 lines
229 B
OCaml
Raw Normal View History

2022-12-06 20:39:15 +01:00
open Ast
open Ast.IR
open Baselib
exception Error of string * Lexing.position
let rec analyze_expr expr env =
match expr with
2022-12-08 14:04:46 +01:00
| Syntax.Int n -> Val (Int n.value)
2022-12-06 22:22:48 +01:00
;;
2022-12-06 20:39:15 +01:00
2022-12-06 22:22:48 +01:00
let analyze parsed = analyze_expr parsed Baselib._types_