Something went wrong. Try again.
ocaml
Something went wrong. Try again.
1.9 kB · 71 lines
OCaml
at pp-ast
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172(* * SPDX-FileCopyrightText: 2024 The Forester Project Contributors * SPDX-FileCopyrightText: 2026 The Forester Project Contributors * * SPDX-License-Identifier: GPL-3.0-or-later *)
open Basemodule T := Types
type node = | Text of string | Verbatim of string | Group of delim * t | Math of math_mode * t | Ident of Trie.path | Hash_ident of string | Xml_ident of string option * string | Subtree of string Range.located option * t | Let of Trie.path * string binding list * t | Open of Trie.path | Scope of t | Put of Trie.path Range.located * t | Default of Trie.path Range.located * t | Get of Trie.path Range.located | Fun of string binding list * t | Object of t _object | Patch of t patch | Call of t * string | Import of visibility * string Range.located | Def of Trie.path * string binding list * t | Decl_xmlns of string * string | Alloc of Trie.path | Namespace of Trie.path * t | Dx_sequent of t * t list | Dx_query of string * t list * t list | Dx_prop of t * t list | Dx_var of string | Dx_const_content of t | Dx_const_uri of t | Comment of string | Error of string[@@deriving show]
and t = node Range.located listand 'a _object = {self: string option; methods: (string * 'a) list}
and 'a patch = { obj: 'a; self: string option; super: string option; methods: (string * 'a) list;}
val pp : Format.formatter -> t -> unit
val equal : t -> t -> bool(** [equal c1 c2] checks if two node lists are equal, it ignores locations. *)
type tree = {source_path: string option; uri: URI.t option; code: t}[@@deriving show]
val parens : t -> nodeval squares : t -> nodeval braces : t -> nodeval import_private : string Range.located -> nodeval import_public : string Range.located -> nodeval inline_math : t -> nodeval display_math : t -> nodeval map : (t -> t) -> node -> nodeval children : node Range.located -> t