package merlin-lib
Merlin's libraries
Install
Dune Dependency
Authors
Maintainers
Sources
merlin-5.5-503.tbz
sha256=67da3b34f2fea07678267309f61da4a2c6f08298de0dc59655b8d30fd8269af1
sha512=1fb3b5180d36aa82b82a319e15b743b802b6888f0dc67645baafdb4e18dfc23a7b90064ec9bc42f7424061cf8cde7f8839178d8a8537bf4596759f3ff4891873
doc/merlin-lib.ocaml_parsing/Ocaml_parsing/Ast_iterator/index.html
Module Ocaml_parsing.Ast_iterator
Source
Ast_iterator.iterator
enables AST inspection using open recursion. A typical mapper would be based on Ast_iterator.default_iterator
, a trivial iterator, and will fall back on it for handling the syntax it does not modify.
Warning: this module is unstable and part of compiler-libs.
A generic Parsetree iterator
Source
type iterator = {
attribute : iterator -> Parsetree.attribute -> unit;
attributes : iterator -> Parsetree.attribute list -> unit;
binding_op : iterator -> Parsetree.binding_op -> unit;
case : iterator -> Parsetree.case -> unit;
cases : iterator -> Parsetree.case list -> unit;
class_declaration : iterator -> Parsetree.class_declaration -> unit;
class_description : iterator -> Parsetree.class_description -> unit;
class_expr : iterator -> Parsetree.class_expr -> unit;
class_field : iterator -> Parsetree.class_field -> unit;
class_signature : iterator -> Parsetree.class_signature -> unit;
class_structure : iterator -> Parsetree.class_structure -> unit;
class_type : iterator -> Parsetree.class_type -> unit;
class_type_declaration : iterator -> Parsetree.class_type_declaration -> unit;
class_type_field : iterator -> Parsetree.class_type_field -> unit;
constructor_declaration : iterator -> Parsetree.constructor_declaration -> unit;
directive_argument : iterator -> Parsetree.directive_argument -> unit;
expr : iterator -> Parsetree.expression -> unit;
extension : iterator -> Parsetree.extension -> unit;
extension_constructor : iterator -> Parsetree.extension_constructor -> unit;
include_declaration : iterator -> Parsetree.include_declaration -> unit;
include_description : iterator -> Parsetree.include_description -> unit;
label_declaration : iterator -> Parsetree.label_declaration -> unit;
location : iterator -> Location.t -> unit;
module_binding : iterator -> Parsetree.module_binding -> unit;
module_declaration : iterator -> Parsetree.module_declaration -> unit;
module_substitution : iterator -> Parsetree.module_substitution -> unit;
module_expr : iterator -> Parsetree.module_expr -> unit;
module_type : iterator -> Parsetree.module_type -> unit;
module_type_declaration : iterator -> Parsetree.module_type_declaration -> unit;
open_declaration : iterator -> Parsetree.open_declaration -> unit;
open_description : iterator -> Parsetree.open_description -> unit;
pat : iterator -> Parsetree.pattern -> unit;
payload : iterator -> Parsetree.payload -> unit;
signature : iterator -> Parsetree.signature -> unit;
signature_item : iterator -> Parsetree.signature_item -> unit;
structure : iterator -> Parsetree.structure -> unit;
structure_item : iterator -> Parsetree.structure_item -> unit;
toplevel_directive : iterator -> Parsetree.toplevel_directive -> unit;
toplevel_phrase : iterator -> Parsetree.toplevel_phrase -> unit;
typ : iterator -> Parsetree.core_type -> unit;
row_field : iterator -> Parsetree.row_field -> unit;
object_field : iterator -> Parsetree.object_field -> unit;
type_declaration : iterator -> Parsetree.type_declaration -> unit;
type_extension : iterator -> Parsetree.type_extension -> unit;
type_exception : iterator -> Parsetree.type_exception -> unit;
type_kind : iterator -> Parsetree.type_kind -> unit;
value_binding : iterator -> Parsetree.value_binding -> unit;
value_description : iterator -> Parsetree.value_description -> unit;
with_constraint : iterator -> Parsetree.with_constraint -> unit;
}
A iterator
record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the iterator to be applied to children in the syntax tree.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page