Js_parser.Parser_env
module SSet: Flow_set.S with type elt = string;
module Lex_mode: { ... };
type parse_options = {
components: bool,
enums: bool,
enable parsing of Flow enums
*/esproposal_decorators: bool,
enable parsing of decorators
*/types: bool,
enable parsing of Flow types
*/use_strict: bool,
treat the file as strict, without needing a "use strict" directive
*/module_ref_prefix: option(string),
module_ref_prefix_LEGACY_INTEROP: option(string),
};
let default_parse_options: parse_options;
let init_env:
?token_sink:option((token_sink_result => unit)) =>
?parse_options:option(parse_options) =>
option(File_key.t) =>
string =>
env;
let in_strict_mode: env => bool;
let in_export: env => bool;
let in_export_default: env => bool;
let comments: env => list(Flow_ast.Comment.t(Loc.t));
let in_loop: env => bool;
let in_switch: env => bool;
let in_formal_parameters: env => bool;
let in_function: env => bool;
let allow_yield: env => bool;
let allow_await: env => bool;
let allow_directive: env => bool;
let allow_super: env => allowed_super;
let has_simple_parameters: env => bool;
let no_in: env => bool;
let no_call: env => bool;
let no_let: env => bool;
let no_anon_function_type: env => bool;
let no_conditional_type: env => bool;
let no_new: env => bool;
let errors: env => list((Loc.t, Parse_error.t));
let parse_options: env => parse_options;
let source: env => option(File_key.t);
let should_parse_types: env => bool;
let error_at: env => (Loc.t, Parse_error.t) => unit;
let error: env => Parse_error.t => unit;
let error_unexpected: ?expected:string => env => unit;
let error_nameless_declaration: env => string => unit;
let strict_error: env => Parse_error.t => unit;
let strict_error_at: env => (Loc.t, Parse_error.t) => unit;
let error_list: env => list((Loc.t, Parse_error.t)) => unit;
let enter_class: env => unit;
let exit_class: env => unit;
let add_declared_private: env => string => unit;
let consume_comments_until: env => Loc.position => unit;
let with_allow_super: allowed_super => env => env;
let with_error_callback: (env => Parse_error.t => unit) => env => env;
let token_is_contextually_reserved: Token.t => bool;
let token_is_reserved: Token.t => bool;
let token_is_reserved_type: Token.t => bool;
let token_is_variance: Token.t => bool;
let token_is_strict_reserved: Token.t => bool;
module Peek: { ... };
module Eat: { ... };
module Expect: { ... };
module Try: { ... };