Library
Module
Module type
Parameter
Class
Class type
is_prefixed prefix i str
checks if prefix is the prefix of str * starting from position i
* pick_while returns a tuple where first element is longest prefix (possibly empty) of the list of elements that satisfy p * and second element is the remainder of the list
val replace_string_ : string -> string -> int -> string -> Buffer.t -> unit
replace_string old_str new_str str
replaces old_str to new_str in str
module StringMap : sig ... end
val syntax_error_extension_node :
Ast_404.Location.t ->
string ->
string Ast_404.Location.loc * Ast_404.Parsetree.payload
Generate a suitable extension node for Merlin's consumption, for the purposes of reporting a syntax error - only used in recovery mode.
val swap_txt : StringMap.key StringMap.t -> StringMap.key -> StringMap.key
val identifier_mapper : (string -> string) -> Ast_404.Ast_mapper.mapper
identifier_mapper maps all identifiers in an AST with a mapping function f
val create_auto_printer_mapper : Ast_404.Ast_mapper.mapper
val unescape_stars_slashes_mapper : Ast_404.Ast_mapper.mapper
unescape_stars_slashes_mapper unescapes all stars and slases in an AST
val escape_stars_slashes_mapper : Ast_404.Ast_mapper.mapper
escape_stars_slashes_mapper escapes all stars and slases in an AST
val swap_operator_mapper :
StringMap.key StringMap.t ->
Ast_404.Ast_mapper.mapper
* swap_operator_mapper is a mapper that swaps two operators at parse/print time. * We need this since we want to transform operator such as "=" in Ocaml to "==" in Reason. * In this case, in the parser, everytime we see a token "==" in Reason, we transform it into "="; * Similarly, in the printer, everytime we see a token "=", we transform it into "==";
val reason_to_ml_swap_map : string StringMap.t
val ml_to_reason_swap_map : string StringMap.t
val reason_to_ml_swap_operator_mapper : Ast_404.Ast_mapper.mapper
val ml_to_reason_swap_operator_mapper : Ast_404.Ast_mapper.mapper
val attribute_equals : 'a -> ('a Ast_404.Asttypes.loc * 'b) -> bool
val attribute_exists : 'a -> ('a Ast_404.Asttypes.loc * 'b) list -> bool
val attributes_conflicted :
'a ->
'a ->
('a Ast_404.Asttypes.loc * 'b) list ->
bool
val normalized_attributes :
'a ->
('a Ast_404.Asttypes.loc * 'b) list ->
('a Ast_404.Asttypes.loc * 'b) list
val apply_mapper_chain_to_structure :
Ast_404.Parsetree.structure ->
Ast_404.Ast_mapper.mapper list ->
Ast_404.Parsetree.structure
val apply_mapper_chain_to_signature :
Ast_404.Parsetree.signature ->
Ast_404.Ast_mapper.mapper list ->
Ast_404.Parsetree.signature
val apply_mapper_chain_to_type :
Ast_404.Parsetree.core_type ->
Ast_404.Ast_mapper.mapper list ->
Ast_404.Parsetree.core_type
val apply_mapper_chain_to_expr :
Ast_404.Parsetree.expression ->
Ast_404.Ast_mapper.mapper list ->
Ast_404.Parsetree.expression
val apply_mapper_chain_to_pattern :
Ast_404.Parsetree.pattern ->
Ast_404.Ast_mapper.mapper list ->
Ast_404.Parsetree.pattern
val apply_mapper_chain_to_toplevel_phrase :
Ast_404.Parsetree.toplevel_phrase ->
Ast_404.Ast_mapper.mapper list ->
Ast_404.Parsetree.toplevel_phrase
val apply_mapper_chain_to_use_file :
Ast_404.Parsetree.toplevel_phrase list ->
Ast_404.Ast_mapper.mapper list ->
Ast_404.Parsetree.toplevel_phrase list
exception Error of Ast_404.Location.t * error
val report_error : Format.formatter -> error -> unit
val menhirMessagesError : menhirError list Pervasives.ref
val findMenhirErrorMessage : Ast_404.Location.t -> menhirError
val add_error_message : menhirMessagesError -> unit