mirror of
https://github.com/LucasVbr/croissant.git
synced 2026-05-13 17:12:10 +00:00
13 lines
375 B
OCaml
13 lines
375 B
OCaml
(* lib/ast/syntax.ml *)
|
|
|
|
type binary_operator = Add | Substract | Multiply | Divide
|
|
type unary_operator = Negate
|
|
|
|
type expression =
|
|
| IntegerLiteral of int
|
|
| UnaryExpression of unary_operator * expression
|
|
| BinaryExpression of binary_operator * expression * expression
|
|
|
|
type statement = ExpressionStatement of expression
|
|
type source_file = SourceFile of statement list
|