Expose the type of tokens and lexers

This will be necessary for some manual parsing

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-07-01 15:20:12 +07:00
parent 67edb7f89e
commit 179d23ee38
1 changed files with 14 additions and 1 deletions

View File

@ -28,6 +28,8 @@ module Loc : sig
val in_file : string -> t
val none : t
val of_lexbuf : Lexing.lexbuf -> t
end
module Template : sig
@ -112,7 +114,18 @@ end
exception Parse_error of Parse_error.t
module Lexer : sig
type t
module Token : sig
type t =
| Atom of Atom.t
| Quoted_string of string
| Lparen
| Rparen
| Sexp_comment
| Eof
| Template of Template.t
end
type t = Lexing.lexbuf -> Token.t
val token : t
val jbuild_token : t