summaryrefslogtreecommitdiff
path: root/src/ast.mli
blob: 557b3f6222a32ceecd1548e48bcff538b31305ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(* Syntaxe abstraite pour mini-C++ *)

(* rien à voir pour l'instant *)

type ident = string

type binop =
	| Equal | NotEqual
	| Lt | Le | Gt | Ge
	| Add | Sub | Mul | Div | Modulo
	| Land | Lor

type unop =
	| PreIncr | PostIncr | PreDecr | PostDecr
	| Ref | Deref
	| Not
	| Minus | Plus

type expr =
	| EBinop of expr * binop * expr
	| EUnary of unop * expr
	| EAssign of expr * expr
	| EIntConst of int
	| EBoolConst of bool
	| EThis
	| ENull
	| EMem of expr * ident