This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
compilation/cours/cours-02/ast.ml
Adrien Guatto abf23ab803 Cours 02
2023-09-27 18:49:08 +02:00

6 lines
349 B
Standard ML

type e =
| EInt of int (** Ex: "42", "31" *)
| EVar of string (** Ex: "x", "y", "foo" *)
| EPlus of e * e (** Ex: "1 + 2", "2 * 3 + 4" *)
| EMult of e * e (** Ex: "1 * 2", "(1 + 2) * 3" *)
| ESum of string * e * e * e (** Ex: "sum (x, 1, 10, x * x)" *)