e0/lib/ast.ml

23 lines
255 B
OCaml
Raw Normal View History

2022-03-08 06:16:27 +00:00
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