SemanticError

Description

sealed class Tinman.Core.Parsing.SemanticError

Derived from

ParsingError abstract

Describes a semantic error at a specific input range.

Public / Constructors

SemanticError

2 overloads


public constructor SemanticError1 → (3)

node in : ICodeRange

[not-null]
The input range of the semantic error.

message in : string

The message that describes the semantic error.

runtime opt : bool = false

Is this a ParsingErrorType.Runtime error?

Creates a new instance of SemanticError.


public constructor SemanticError2 → (3)

range in : RangeI

The input range of the semantic error.

message in : string

The message that describes the semantic error.

runtime opt : bool = false

Is this a ParsingErrorType.Runtime error?

Creates a new instance of SemanticError.

Public / Methods

AstInvalidStructure


public static method AstInvalidStructure → (2)

node in : AstNode

[not-null]
The AST node that is invalid.

message opt : string = null

Optional error message.

returns → SemanticError

The error object.

The structure of the abstract syntax tree is invalid, the PSI model cannot be created.

AstMismatchedType


public static method AstMismatchedType → (2)

node in : AstNode

[not-null]
The AST node that is invalid.

expected opt : string = null

Optional list of expected AST node types, separated with '|'.

returns → SemanticError

The error object.

The type of an abstract syntax tree node does not match any of the expected types.

PsiMissingMethod


public static method PsiMissingMethod → (1)

node in : AstNode

[not-null]
The AST node that is invalid.

returns → SemanticError

The error object.

The AST type does not have an attached PSI factory method, the PSI model cannot be created.