AstNode

io.eleven19.ascribe.ast.AstNode
See theAstNode companion object
sealed trait AstNode

Base trait for all AST nodes. Every node carries a source span.

Attributes

Companion
object
Source
Document.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Block
class Admonition
class Comment
class Example
class Heading
class Listing
class Literal
class Open
class OrderedList
class Paragraph
class Pass
class Quote
class Section
class Sidebar
class Table
class Document
trait Inline
class Bold
class Italic
class Link
class Mono
class Text
class ListItem
class TableCell
class TableRow
class Title
Show all

Members list

Value members

Abstract methods

def span: Span

Attributes

Source
Document.scala

Concrete methods

def children: List[AstNode]
Extension method from io.eleven19.ascribe.ast

Return all direct child nodes.

Return all direct child nodes.

Attributes

Source
AstVisitor.scala
def collect[B](pf: PartialFunction[AstNode, B]): List[B]
Extension method from io.eleven19.ascribe.ast

Collect values from all descendant nodes matching a partial function (pre-order).

Collect values from all descendant nodes matching a partial function (pre-order).

Attributes

Source
AstVisitor.scala
def collectPostOrder[B](pf: PartialFunction[AstNode, B]): List[B]
Extension method from io.eleven19.ascribe.ast

Collect values from all descendant nodes matching a partial function (post-order).

Collect values from all descendant nodes matching a partial function (post-order).

Attributes

Source
AstVisitor.scala
def count: Int
Extension method from io.eleven19.ascribe.ast

Count all nodes in this subtree.

Count all nodes in this subtree.

Attributes

Source
AstVisitor.scala
def fold[A](init: A)(f: (A, AstNode) => A): A
Extension method from io.eleven19.ascribe.ast

Pre-order fold (alias for foldLeft).

Pre-order fold (alias for foldLeft).

Attributes

Source
AstVisitor.scala
def foldLeft[A](init: A)(f: (A, AstNode) => A): A
Extension method from io.eleven19.ascribe.ast

Pre-order left fold over this node and all descendants.

Pre-order left fold over this node and all descendants.

Attributes

Source
AstVisitor.scala
def foldRight[A](init: A)(f: (AstNode, A) => A): A
Extension method from io.eleven19.ascribe.ast

Post-order right fold over this node and all descendants.

Post-order right fold over this node and all descendants.

Attributes

Source
AstVisitor.scala
def visit[A](visitor: AstVisitor[A]): A
Extension method from io.eleven19.ascribe.ast

Apply a visitor to this node.

Apply a visitor to this node.

Attributes

Source
AstVisitor.scala