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>, out FormDesignerFormatException?)); 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
LineEnding
The characters the lines of the module's text end with: "\r\n", "\n" or "\r", as the first line of the text ends; "\r\n"
for a text of one line.
public string LineEnding { get; init; }
Property Value
Remarks
An edit that writes lines of its own ends them with it, so that they end the way the lines around them do (LineEdits). A text whose lines do not all end the same way has the ending of its first line. The parser sets it, from the text it reads.
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),
the unary + signs, which the VBE erases (ErasedPlusTriviaNode), and the line continuations (LineContinuationTriviaNode).
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
Success(ModuleNode)
public static ModuleParseResult Success(ModuleNode node)
Parameters
nodeModuleNode