2 * Copyright (c) 2018, Facebook, Inc.
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the "hack" directory of this source tree. An additional grant
7 * of patent rights can be found in the PATENTS file in the same directory.
12 * Explicitly exporting the definition of `Syntax` used in the lowerer. This
15 module Syntax
= Full_fidelity_editable_positioned_syntax
18 * The `env` of the lowerer is "full request." It provides all the settings the
19 * lowerer needs to produce an AST.
25 : ?hhvm_compat_mode
:bool
27 -> ?php5_compat_mode
:bool
28 -> ?elaborate_namespaces
:bool
29 -> ?include_line_comments
:bool
33 -> ?lower_coroutines
:bool
34 -> ?enable_hh_syntax
:bool
35 -> ?parser_options
:GlobalOptions.t
36 -> ?fi_mode
:FileInfo.mode
38 -> ?stats
:Stats_container.t
44 * A `result` contains some information from the original `env`; the information
45 * that is typically required later. This is still quite ad-hoc and should be
46 * redesigned properly at some point.
49 { fi_mode
: FileInfo.mode
53 ; file
: Relative_path.t
54 ; comments
: (Pos.t
* Prim_defs.comment
) list
58 -> source_text
:Syntax.SourceText.t
61 val from_text
: env
-> Syntax.SourceText.t
-> result
62 val from_file
: env
-> result
65 * Here only for backward compatibility. Consider these deprecated.
67 val from_text_with_legacy
: env
-> string -> Parser_hack.parser_return
68 val from_file_with_legacy
: env
-> Parser_hack.parser_return