Crate biome_rowan

source ·
Expand description

A generic library for lossless syntax trees. See examples/s_expressions.rs for a tutorial.

Re-exports§

Modules§

  • Implementation of the cursors – API for convenient access to syntax trees.
  • Provides a sample language implementation that is useful in API explanation or tests

Macros§

Structs§

Enums§

Traits§

  • The main trait to go from untyped SyntaxNode to a typed ast. The conversion itself has zero runtime cost: ast and syntax nodes have exactly the same representation: a pointer to the tree root and a pointer to the node itself.
  • List of homogenous nodes
  • An AstNode that supports dynamic ordering of the fields it contains uses a slot_map to map the declared order of fields to the concrete order as parsed from the source content. Implementing this trait lets consumers
  • List of nodes where every two nodes are separated by a token. For example, the elements of an array where every two elements are separated by a comma token. The list expects that the underlying syntax node has a slot for every node and separator even if they are missing from the source code. For example, a list for a b where the , separator is missing contains the slots Node(a), Empty, Node(b). This also applies for missing nodes: the list for , b, must have the slots Empty, Token(,), Node(b), Token(,).
  • Factory for creating syntax nodes of a particular kind.
  • Primitives with a textual length that can be passed to TextSize::of.

Functions§

Type Aliases§