default

Classes

c
AbstractCompositeNode(
nodeKind: NodeKind,
children: Array<AbstractNode>
)

Represents an abstract composite node in the abstract syntax tree. This class extends the AbstractNode class and provides a base for nodes that can have child nodes.

c
InternalScannerError(
errorMessage: string,
location?: Location
)

Indicates an internal logic error in the scanner implementation.

c
SdlStringInput(input: string)

The SdlStringInput class implements the Input interface for a string input. It provides methods to read and chunk the input string.

c
SemanticError(
errorMessage: string,
location?: Location
)

Indicates a semantic error in the provided AST.

c
SemanticWarning(
warningMessage: string,
location?: Location
)

Indicates a semantic warning in the provided AST.

c
TraversingVisitor(nodeHandler: NodeHandler)

A visitor that traverses nodes and delegates operations to a node handler.

Enums

E
ArrayDimensionKind

Enum representing different kinds of array dimensions.

E
BinaryOperatorKind

Enum representing different kinds of binary operators.

E
ClassIdKind

Enum representing different kinds of class IDs. This enum is used to categorize different types of class IDs.

E
ElementaryTypeKind

Enum representing different kinds of elementary types.

E
ExpressionKind

Enum representing different kinds of expressions.

E
NodeKind

Enum representing different kinds of nodes.

E
NumberLiteralKind

Enum representing different kinds of number literals.

E
StatementKind

Enum representing different kinds of statements.

E
StringLiteralKind

Enum representing the kinds of string literals.

E
StringVariableKind

Enum representing the kinds of string variables.

Functions

f
collateSyntaxErrors(
parseTree: Tree,
sdlStringInput: SdlStringInput
): SyntaxError[]

Return a collated list of syntax errors from the parse tree.

f
createLenientSdlAnalyser(checks?: Check[] | undefined): SdlAnalyser

Create a lenient SDL analyser and store it as a "singleton".

f
createLenientSdlParser(): LezerParser

Create an in memory lenient Lezer based parser using the SDL grammar and store it as a "singleton".

f
createStrictSdlAnalyser(checks?: Check[] | undefined): SdlAnalyser

Create a strict SDL analyser and store it as a "singleton".

f
createStrictSdlParser(): LezerParser

Create an in memory strict Lezer based parser using the SDL grammar and store it as a "singleton".

f
createSyntaxErrorFromTextAndCursor(
text: Text,
cursor: TreeCursor
): SyntaxError

Helper function to create a SyntaxError from the text and a cursor positioned at an error node. As the cursor from a parse tree is available, details on missing or unexpected tokens can be extracted.

f
dispatchNodeHandler(
specification: Specification,
nodeHandler: NodeHandler
): void

Dispatch a node handler to visit all nodes in the abstract syntax tree.

f
getPotentialSyntacticTokens(cursor: TreeCursor): string[] | undefined

Given a TreeCursor positioned at a node, returns the potential syntactic tokens at that position.

f
getPotentialTokenTypeIds(cursor: TreeCursor): number[] | undefined

Given a TreeCursor positioned at a node, returns the potential token types at that position.

Interfaces

I
Location

Represents a location within a text document.

I
NodeVisitor

Interface representing a visitor for nodes.

I
Trivia

Represents a parsed trivia item.

Namespaces

Variables