NodeStackEntry

public final class NodeStackEntry<NodeType> : CustomStringConvertible where NodeType : Node

NodeStackEntry‘s are used to capture parsing context (for example child-nodes and errors) ASTs are constructed.

  • The child nodes of this node

    Declaration

    Swift

    public var nodes: [NodeType]
  • Should be called when a child node is created

    Declaration

    Swift

    public func append(_ node: NodeType)

    Parameters

    node

    The new child node

  • Adds all of the supplied nodes as this nodes children

    Declaration

    Swift

    public func adopt(_ nodes: [NodeType])

    Parameters

    nodes

    The new child nodes

  • A human readable description of the context

    Declaration

    Swift

    public var description: String { get }