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.
Indicates an internal logic error in the scanner implementation.
Base error class.
The SdlStringInput class implements the Input interface for a string input.
It provides methods to read and chunk the input string.
-
chunk(from: number): string
Get the chunk from the given position. The returned string starts at
from(0-based) and, if that isn't the end of the string, may be of any length greater than zero. - input: string
-
length()
The length of the document.
-
lineChunks: boolean
Indicates that the chunks do not already end at line breaks and that client code that wants to work by-line must scanning for line breaks.
-
read(): stringfrom: number,to: number
Read the part of the document between the given positions.
Indicates a semantic error in the provided AST.
Indicates a semantic warning in the provided AST.
Indicates a syntactic error in the provided source.
A visitor that traverses nodes and delegates operations to a node handler.
- depth: number
-
visit(node: AbstractNode): void
Called when visiting a node.
Enum representing different kinds of array dimensions.
Enum representing different kinds of binary operators.
Enum representing different kinds of class IDs. This enum is used to categorize different types of class IDs.
Enum representing different kinds of elementary types.
Enum representing different kinds of expressions.
Enum representing different kinds of nodes.
Enum representing different kinds of number literals.
Enum representing different kinds of statements.
Enum representing the kinds of string literals.
Enum representing the kinds of string variables.
Process the SDL parse tree and return an abstract syntax tree.
Return a collated list of syntax errors from the parse tree.
Create a lenient SDL analyser and store it as a "singleton".
Create an in memory lenient Lezer based parser using the SDL grammar and store it as a "singleton".
Create a strict SDL analyser and store it as a "singleton".
Create an in memory strict Lezer based parser using the SDL grammar and store it as a "singleton".
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.
Dispatch a node handler to visit all nodes in the abstract syntax tree.
Given a TreeCursor positioned at a node, returns the potential syntactic tokens at that position.
Given a TreeCursor positioned at a node, returns the potential token types at that position.
Interface representing a handler for nodes in an abstract syntax tree.
Interface representing a visitor for nodes.
-
visit(node: AbstractNode): void
Called when visiting a node.