Class ModuleParseResult
public record ModuleParseResult : IEquatable<ModuleParseResult>
- Inheritance
-
ModuleParseResult
- Implements
- Inherited Members
Properties
Designer
What the module's designer declares, when the module is a form module: the form's class and its controls, read from the module's designer block and
its companion .frx file (Read(string?, ReadOnlyMemory<byte>)); null for any other module, and for a form whose designer data cannot be read.
public FormDescriptor? Designer { get; init; }
Property Value
Remarks
The parser, which reads text alone, never sets it: the language server, which has the companion file, does, on the parse it caches. It travels with the parse to the host, whose checks of the module's declarations need to know the names its controls take.
IsSuccess
public bool IsSuccess { get; }
Property Value
PrecompilerTrivia
public ImmutableArray<SyntaxNode> PrecompilerTrivia { get; init; }
Property Value
SyntaxErrors
public ImmutableArray<VBSyntaxErrorInfo> SyntaxErrors { get; init; }
Property Value
SyntaxTree
public ModuleNode? SyntaxTree { get; init; }
Property Value
Trivia
The source of the module that is not code, in the order it is written: the .cls file header (ModuleHeaderTriviaNode),
comments (CommentTriviaNode) and the annotations in them (AnnotationTriviaNode, inside the range of the comment that holds them).
public ImmutableArray<SyntaxNode> Trivia { get; init; }
Property Value
Remarks
Together with SyntaxTree and PrecompilerTrivia it accounts for every token of the source, which is what a formatter or an exporter needs to write the module back out. Trivia is not among the children of the syntax nodes, since it can be written anywhere.
Methods
Failed(SourceLocation, string, SourcePathScrubMode)
A failed parse carrying one synthesized syntax error. verbose is scrubbed
through SourcePathAnonymizer per scrub, so this funnel cannot
leak a build-machine source path onto the wire regardless of the call site.
public static ModuleParseResult Failed(SourceLocation location, string verbose, SourcePathScrubMode scrub = SourcePathScrubMode.RepoRelative)
Parameters
locationSourceLocationverbosestringscrubSourcePathScrubMode
Returns
Success(ModuleNode)
public static ModuleParseResult Success(ModuleNode node)
Parameters
nodeModuleNode