zpu: simple fn with stack slots compile
[llvm/zpu.git] / examples / OCaml-Kaleidoscope / Chapter6 / token.ml
blobc7a5f95092d1219e5a240d5861e33034c967408f
1 (*===----------------------------------------------------------------------===
2 * Lexer Tokens
3 *===----------------------------------------------------------------------===*)
5 (* The lexer returns these 'Kwd' if it is an unknown character, otherwise one of
6 * these others for known things. *)
7 type token =
8 (* commands *)
9 | Def | Extern
11 (* primary *)
12 | Ident of string | Number of float
14 (* unknown *)
15 | Kwd of char
17 (* control *)
18 | If | Then | Else
19 | For | In
21 (* operators *)
22 | Binary | Unary