module Ast:sig..end
Parsed syntax trees
typelocation =Stdlib.Lexing.position * Stdlib.Lexing.position
type ident = {
|
loc : |
|
id : |
}
type unop =
| |
Uneg |
| |
Unot |
| |
Uamp |
| |
Ustar |
type binop =
| |
Badd |
|||
| |
Bsub |
|||
| |
Bmul |
|||
| |
Bdiv |
|||
| |
Bmod |
|||
| |
Beq |
|||
| |
Bne |
|||
| |
Blt |
|||
| |
Ble |
|||
| |
Bgt |
|||
| |
Bge |
|||
| |
Band |
|||
| |
Bor |
(* | && || | *) |
type constant =
| |
Cbool of |
| |
Cint of |
| |
Cstring of |
type ptyp =
| |
PTident of |
(* | bool, int, string, or struct id | *) |
| |
PTptr of |
type incdec =
| |
Inc |
|||
| |
Dec |
(* | ++ -- | *) |
type pexpr = {
|
pexpr_desc : |
|
pexpr_loc : |
}
type pexpr_desc =
| |
PEskip |
| |
PEconstant of |
| |
PEbinop of |
| |
PEunop of |
| |
PEnil |
| |
PEcall of |
| |
PEident of |
| |
PEdot of |
| |
PEassign of |
| |
PEvars of |
| |
PEif of |
| |
PEreturn of |
| |
PEblock of |
| |
PEfor of |
| |
PEincdec of |
typepparam =ident * ptyp
type pfunc = {
|
pf_name : |
|
pf_params : |
|
pf_typ : |
|
pf_body : |
}
typepfield =ident * ptyp
type pstruct = {
|
ps_name : |
|
ps_fields : |
}
type pdecl =
| |
PDfunction of |
| |
PDstruct of |
typeimport_fmt =bool
if `import "fmt"` is present
typepfile =import_fmt * pdecl list