package merlin-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Browse_node offers a uniform interface to traverse constructions from * TypedTree. * * Mutually recursive types from TypedTree are wrapped into different * constructors of the type node. * Then the fold function traverses one-level of sub-nodes. * * In the meantime, the most specific environment and location are threaded * (FIXME: should these two be managed separately?). * * Finally BrowseT module a node into a tree which structure mimics * the recursive structure of the TypedTree node. *

type constructor_declaration = Ocaml_typing.Typedtree.constructor_declaration
type node =
  1. | Dummy
  2. | Pattern : _ Ocaml_typing.Typedtree.general_pattern -> node
  3. | Expression of Ocaml_typing.Typedtree.expression
  4. | Case : _ Ocaml_typing.Typedtree.case -> node
  5. | Class_expr of Ocaml_typing.Typedtree.class_expr
  6. | Class_structure of Ocaml_typing.Typedtree.class_structure
  7. | Class_field of Ocaml_typing.Typedtree.class_field
  8. | Class_field_kind of Ocaml_typing.Typedtree.class_field_kind
  9. | Module_expr of Ocaml_typing.Typedtree.module_expr
  10. | Module_type_constraint of Ocaml_typing.Typedtree.module_type_constraint
  11. | Structure of Ocaml_typing.Typedtree.structure
  12. | Signature of Ocaml_typing.Typedtree.signature
  13. | Structure_item of Ocaml_typing.Typedtree.structure_item * Ocaml_typing.Env.t
  14. | Signature_item of Ocaml_typing.Typedtree.signature_item * Ocaml_typing.Env.t
  15. | Module_binding of Ocaml_typing.Typedtree.module_binding
  16. | Value_binding of Ocaml_typing.Typedtree.value_binding
  17. | Module_type of Ocaml_typing.Typedtree.module_type
  18. | Module_declaration of Ocaml_typing.Typedtree.module_declaration
  19. | Module_type_declaration of Ocaml_typing.Typedtree.module_type_declaration
  20. | With_constraint of Ocaml_typing.Typedtree.with_constraint
  21. | Core_type of Ocaml_typing.Typedtree.core_type
  22. | Package_type of Ocaml_typing.Typedtree.package_type
  23. | Row_field of Ocaml_typing.Typedtree.row_field
  24. | Value_description of Ocaml_typing.Typedtree.value_description
  25. | Type_declaration of Ocaml_typing.Typedtree.type_declaration
  26. | Type_kind of Ocaml_typing.Typedtree.type_kind
  27. | Type_extension of Ocaml_typing.Typedtree.type_extension
  28. | Extension_constructor of Ocaml_typing.Typedtree.extension_constructor
  29. | Label_declaration of Ocaml_typing.Typedtree.label_declaration
  30. | Constructor_declaration of Ocaml_typing.Typedtree.constructor_declaration
  31. | Class_type of Ocaml_typing.Typedtree.class_type
  32. | Class_signature of Ocaml_typing.Typedtree.class_signature
  33. | Class_type_field of Ocaml_typing.Typedtree.class_type_field
  34. | Class_declaration of Ocaml_typing.Typedtree.class_declaration
  35. | Class_description of Ocaml_typing.Typedtree.class_description
  36. | Class_type_declaration of Ocaml_typing.Typedtree.class_type_declaration
  37. | Include_description of Ocaml_typing.Typedtree.include_description
  38. | Include_declaration of Ocaml_typing.Typedtree.include_declaration
  39. | Open_description of Ocaml_typing.Typedtree.open_description
  40. | Open_declaration of Ocaml_typing.Typedtree.open_declaration
  41. | Method_call of Ocaml_typing.Typedtree.expression * Ocaml_typing.Typedtree.meth * Ocaml_parsing.Location.t
  42. | Record_field of [ `Expression of Ocaml_typing.Typedtree.expression | `Pattern of Ocaml_typing.Typedtree.pattern ] * Ocaml_typing.Types.label_description * Ocaml_parsing.Longident.t Ocaml_parsing.Location.loc
  43. | Module_binding_name of Ocaml_typing.Typedtree.module_binding
  44. | Module_declaration_name of Ocaml_typing.Typedtree.module_declaration
  45. | Module_type_declaration_name of Ocaml_typing.Typedtree.module_type_declaration
val fold_node : (Ocaml_typing.Env.t -> node -> 'a -> 'a) -> Ocaml_typing.Env.t -> node -> 'a -> 'a

Accessors for information specific to a node

val node_update_env : Ocaml_typing.Env.t -> node -> Ocaml_typing.Env.t
val node_attributes : node -> Ocaml_typing.Typedtree.attribute list
val string_of_node : node -> string
OCaml

Innovation. Community. Security.