Js_parser.Flow_ast_utils
let fold_bindings_of_pattern:
('a => Flow_ast.Identifier.t('m, 't) => 'a) =>
'a =>
Flow_ast.Pattern.t('m, 't) =>
'a;
let fold_bindings_of_variable_declarations:
(bool => 'a => Flow_ast.Identifier.t('m, 't) => 'a) =>
'a =>
list(Flow_ast.Statement.VariableDeclaration.Declarator.t('m, 't)) =>
'a;
let pattern_has_binding: Flow_ast.Pattern.t('m, 't) => bool;
let partition_directives:
list(Flow_ast.Statement.t(Loc.t, Loc.t)) =>
(list(Flow_ast.Statement.t(Loc.t, Loc.t)), list(Flow_ast.Statement.t
(Loc.t,
Loc.t)));
let hoist_function_and_component_declarations:
list(Flow_ast.Statement.t('a, 'b)) =>
list(Flow_ast.Statement.t('a, 'b));
let is_call_to_invariant: Flow_ast.Expression.t('a, 'b) => bool;
let is_call_to_is_array: Flow_ast.Expression.t('a, 'b) => bool;
let is_call_to_object_dot_freeze: Flow_ast.Expression.t('a, 'b) => bool;
let is_call_to_object_static_method: Flow_ast.Expression.t('a, 'b) => bool;
let is_super_member_access: Flow_ast.Expression.Member.t('a, 'b) => bool;
let loc_of_expression: Flow_ast.Expression.t('a, 'a) => 'a;
let loc_of_statement: Flow_ast.Statement.t('a, 'a) => 'a;
let loc_of_pattern: Flow_ast.Pattern.t('a, 'a) => 'a;
let loc_of_ident: Flow_ast.Identifier.t('a, 'a) => 'a;
let name_of_ident: Flow_ast.Identifier.t('loc, 'a) => string;
let source_of_ident: Flow_ast.Identifier.t('a, 'a) => source('a);
let ident_of_source:
?comments:Flow_ast.Syntax.t('a, unit) =>
source('a) =>
Flow_ast.Identifier.t('a, 'a);
let mk_comments:
?leading:list(Flow_ast.Comment.t('loc)) =>
?trailing:list(Flow_ast.Comment.t('loc)) =>
'a =>
Flow_ast.Syntax.t('loc, 'a);
let mk_comments_opt:
?leading:list(Flow_ast.Comment.t('loc)) =>
?trailing:list(Flow_ast.Comment.t('loc)) =>
unit =>
option(Flow_ast.Syntax.t('loc, unit));
let mk_comments_with_internal_opt:
?leading:list(Flow_ast.Comment.t('loc)) =>
?trailing:list(Flow_ast.Comment.t('loc)) =>
internal:list(Flow_ast.Comment.t('loc)) =>
unit =>
option(Flow_ast.Syntax.t('loc, list(Flow_ast.Comment.t('loc))));
let merge_comments:
inner:option(Flow_ast.Syntax.t('M, unit)) =>
outer:option(Flow_ast.Syntax.t('M, unit)) =>
option(Flow_ast.Syntax.t('M, unit));
let merge_comments_with_internal:
inner:option(Flow_ast.Syntax.t('M, list(Flow_ast.Comment.t('loc)))) =>
outer:option(Flow_ast.Syntax.t('M, 'a)) =>
option(Flow_ast.Syntax.t('M, list(Flow_ast.Comment.t('loc))));
let split_comments:
option(Flow_ast.Syntax.t('loc, unit)) =>
(option(Flow_ast.Syntax.t('loc, unit)), option(Flow_ast.Syntax.t('loc, unit)));
module ExpressionSort: { ... };
let string_of_assignment_operator:
Flow_ast.Expression.Assignment.operator =>
string;
let string_of_binary_operator: Flow_ast.Expression.Binary.operator => string;
let loc_of_annotation_or_hint:
Flow_ast.Type.annotation_or_hint('loc, 'loc) =>
'loc;
let loc_of_return_annot: Flow_ast.Function.ReturnAnnot.t('loc, 'loc) => 'loc;
let push_toplevel_type:
't =>
Flow_ast.Expression.t('loc, ('loc, 't)) =>
Flow_ast.Expression.t('loc, ('loc, 't));
let hook_function: Flow_ast.Function.t('a, 'b) => option('b);
let hook_call: Flow_ast.Expression.Call.t('loc, 'loc) => bool;