File: flow_lexer.mli

package info (click to toggle)
js-of-ocaml 5.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,020 kB
  • sloc: ml: 91,250; javascript: 57,289; ansic: 315; makefile: 271; lisp: 23; sh: 6; perl: 4
file content (45 lines) | stat: -rw-r--r-- 790 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *)

module Lex_mode : sig
  type t =
    | NORMAL
    | BACKQUOTE
    | REGEXP
end

module Parse_error : sig
  type t

  val to_string : t -> string
end

module Lex_env : sig
  type t

  val create : Sedlexing.lexbuf -> t
end

module Lex_result : sig
  type t

  val token : t -> Js_token.t

  val loc : t -> Loc.t

  val errors : t -> (Loc.t * Parse_error.t) list
end

val drop_line : Lex_env.t -> unit

val regexp : Lex_env.t -> Lex_env.t * Lex_result.t

val token : Lex_env.t -> Lex_env.t * Lex_result.t

val lex : Lex_env.t -> Lex_env.t * Lex_result.t

val is_valid_identifier_name : string -> bool