Class VBSyntaxErrorInfo
Encapsulates the serializable error data for a syntax error.
public record VBSyntaxErrorInfo : VBErrorInfo, IEquatable<VBErrorInfo>, IEquatable<VBSyntaxErrorInfo>
- Inheritance
-
VBSyntaxErrorInfo
- Implements
- Inherited Members
Remarks
A syntax error occurs while traversing the concrete syntax tree (CST) in the parser. A single positional constructor keeps the type round-trippable through System.Text.Json.
Constructors
VBSyntaxErrorInfo(int, SourceLocation, string, string)
Encapsulates the serializable error data for a syntax error.
public VBSyntaxErrorInfo(int ErrorId, SourceLocation Location, string Description, string Verbose)
Parameters
ErrorIdintThe numeric representation of the VBCompileErrorId for this syntax error.
LocationSourceLocationThe document location of the faulted CST node.
DescriptionstringAn error description. "Syntax error" unless specified otherwise.
VerbosestringA detailed message identifying the faulted CST token and detailing its semantics.
Remarks
A syntax error occurs while traversing the concrete syntax tree (CST) in the parser. A single positional constructor keeps the type round-trippable through System.Text.Json.
Properties
VBCompileErrorId
The formal error ID — a class of compilation error that occurs during parsing as the syntax tree is assembled.
public VBCompileErrorId VBCompileErrorId { get; }
Property Value
Methods
For(VBCompileErrorId, SourceLocation, string)
Creates a VBSyntaxErrorInfo for the specified VBCompileErrorId at the specified SourceLocation.
public static VBSyntaxErrorInfo For(VBCompileErrorId vbCompileErrorId, SourceLocation location, string Verbose)
Parameters
vbCompileErrorIdVBCompileErrorIdThe formal error code.
locationSourceLocationThe document location of the problematic node.
VerbosestringA detailed message appended depending on the server trace configuration.