File: expr06.ml

package info (click to toggle)
ocaml-visitors 20251114-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,944 kB
  • sloc: ml: 4,035; makefile: 42; sh: 18
file content (16 lines) | stat: -rw-r--r-- 274 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
type unop =
  | UnaryMinus

and binop =
  | BinaryMinus
  | BinaryAdd
  | BinaryMul
  | BinaryDiv

and expr =
  | EConst of int
  | EUnOp of unop * expr
  | EBinOp of expr * binop * expr

[@@deriving visitors { variety = "iter" },
            visitors { variety = "map"  }]