function buildAst
buildAst(
parseTree: Tree,
sdlStringInput: SdlStringInput,
lenient?: boolean,
): RequiredNode<Specification>

Process the SDL parse tree and return an abstract syntax tree.

Parameters

parseTree: Tree

The parse Tree generated from the SDL source.

sdlStringInput: SdlStringInput

The SDL source text as an SdlStringInput.

optional
lenient: boolean = false

If true, the AST construction will be lenient and create error tokens and nodes for parse errors in the parse tree.

Return Type

RequiredNode<Specification>

Usage

import { buildAst } from ".";