Fixed some bugs.
[llvm/zpu.git] / examples / OCaml-Kaleidoscope / Chapter2 / token.ml
blob2ca782e149971e610b89d1a07102e1ebae32cf35
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