-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser_hack.mli
More file actions
28 lines (24 loc) · 848 Bytes
/
Copy pathparser_hack.mli
File metadata and controls
28 lines (24 loc) · 848 Bytes
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
(**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the "hack" directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*)
type parser_return = {
file_mode : FileInfo.mode option; (* None if PHP *)
comments : (Pos.t * string) list;
ast : Ast.program;
error : (Pos.t * string) option;
}
val program : ?elaborate_namespaces:bool -> Relative_path.t ->
string -> parser_return
(* Parses a file *)
val from_file : Relative_path.t -> parser_return
type saved_lb
type assoc
val save_lexbuf_state: Lexing.lexbuf -> saved_lb
val restore_lexbuf_state: Lexing.lexbuf -> saved_lb -> unit
val get_priority: Lexer_hack.token -> assoc * int