e0/lib/ast.ml
2022-03-08 00:16:27 -06:00

22 lines
255 B
OCaml

type op
= OpAdd
| OpSub
| OpMul
| OpDiv
type lit
= LitInt of int64
| LitFloat of float
type expr
= ExprLit of lit
| ExprBin of expr * op * expr
type func =
{ name : string
}
type decl
= DeclFunc of func
type program = decl list