Contains the normalized AST as a doubly linked tree and a map from ids to nodes so that parent links can be chased easily.

interface NormalizedAst<
    OtherInfo = ParentInformation,
    Node = RNode<OtherInfo & ParentInformation>,
> {
    ast: Node;
    hasError?: boolean;
    idMap: AstIdMap<OtherInfo>;
}

Type Parameters

Properties

Properties

ast: Node

The root of the AST with parent information

hasError?: boolean

marks whether the AST contains potential syntax errors

Bidirectional mapping of ids to the corresponding nodes and the other way