Describes a semantic error at a specific input range.
sealed class
|
SemanticError
|
extends
|
ParsingError
|
See also:
ParsingErrorType.SemanticThe parser error type.
public
readonly
field
|
ErrorType
|
||
type
|
ParsingErrorType
|
||
inherited
|
ParsingError.ErrorType
|
The context object.
public
property
|
MessageContext
{
get
set
}
|
||
type
|
object
|
||
value
|
The
context
object
or
null . |
||
inherited
|
ValidateMessage.MessageContext
|
The model path that leads to the error source.
public
property
|
MessagePath
{
get
set
}
|
||
type
|
ValidatePath
|
||
value
|
The error path (will be None) if no path is available. | ||
inherited
|
ValidateMessage.MessagePath
|
Message that describes this error.
public
property
|
MessageText
{
get
}
|
||
type
|
string
|
||
value
|
|
The error message. | |
inherited
|
ValidateMessage.MessageText
|
The message type.
public
property
|
MessageType
{
get
}
|
||
type
|
ValidateMessageType
|
||
value
|
The message type. | ||
inherited
|
ValidateMessage.MessageType
|
Returns source code range of this object.
public
property
|
Range
{
get
}
|
||
type
|
RangeI
|
||
value
|
The source code character range or Inv if none. | ||
inherited
|
ParsingError.Range
|
Creates a new instance of SemanticError.
public
constructor
|
SemanticError
(string message)
|
||
params
|
message
|
The message that describes the semantic error. |
Creates a new instance of SemanticError.
public
constructor
|
SemanticError
(ICodeRange node,
string message,
bool runtime = false)
|
||
params
|
node
|
[not-null]
|
The input range of the semantic error. |
message
|
The message that describes the semantic error. | ||
runtime
|
Is this a Runtime error? |
Creates a new instance of SemanticError.
public
constructor
|
SemanticError
(RangeI range,
string message,
bool runtime = false)
|
||
params
|
range
|
The input range of the semantic error. | |
message
|
The message that describes the semantic error. | ||
runtime
|
Is this a Runtime error? |
The structure of the abstract syntax tree is invalid, the PSI model cannot be created.
public
static
method
|
AstInvalidStructure
(AstNode node,
string message = null)
|
||
type
|
SemanticError
|
||
params
|
node
|
[not-null]
|
The AST node that is invalid. |
message
|
Optional
error
message.
Defaults
to
null . |
||
returns
|
|
The error object. |
The type of an abstract syntax tree node does not match any of the expected types.
public
static
method
|
AstMismatchedType
(AstNode node,
string expected = null)
|
||
type
|
SemanticError
|
||
params
|
node
|
[not-null]
|
The AST node that is invalid. |
expected
|
Optional
list
of
expected
AST
node
types,
separated
with
'|' .
Defaults
to
null .
|
||
returns
|
|
The error object. |
Compares this object with the given one.
[Pure]
|
||||
public
override
method
|
CompareTo
(IValidateMessage other)
|
|||
type
|
int32
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
<
0
:
if
this
object
is
less
than
other, = 0 : if this object is equal to other, > 0 : if this object is greater than other. |
|||
inherited
|
ParsingError.CompareTo
|
Compares this object with the given one.
[Pure]
|
||||
public
override
method
|
Equals
(IValidateMessage other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
overrides
|
ParsingError.Equals
|
The AST type does not have an attached PSI factory method, the PSI model cannot be created.
public
static
method
|
PsiMissingMethod
(AstNode node)
|
||
type
|
SemanticError
|
||
params
|
node
|
[not-null]
|
The AST node that is invalid. |
returns
|
|
The error object. |
public
method
|
Throw
(string source)
|
||
type
|
ValidatingException
|
||
params
|
source
|
||
inherited
|
ValidateMessage.Throw
|
Wraps this error object in an exception.
public
method
|
Throw
(string source,
ICodeInput input)
|
||
type
|
ValidatingException
|
||
params
|
source
|
Error source tag (see ErrorSource). | |
input
|
[not-null]
|
The input source code (for error reporting). | |
returns
|
The ready-to-throw exception. | ||
inherited
|
ParsingError.Throw
|
[Pure]
|
||||
public
override
sealed
method
|
ToString
()
|
|||
type
|
string
|
|||
inherited
|
ValidateMessage.ToString
|
public
override
method
|
ToString
(IValidateMessage previous)
|
||
type
|
string
|
||
params
|
previous
|
||
inherited
|
ParsingError.ToString
|