]> git.proxmox.com Git - rustc.git/blob - src/llvm/examples/OCaml-Kaleidoscope/Chapter2/token.ml
Imported Upstream version 1.0.0+dfsg1
[rustc.git] / src / llvm / examples / OCaml-Kaleidoscope / Chapter2 / token.ml
1 (*===----------------------------------------------------------------------===
2 * Lexer Tokens
3 *===----------------------------------------------------------------------===*)
4
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
10
11 (* primary *)
12 | Ident of string | Number of float
13
14 (* unknown *)
15 | Kwd of char