All pages
Powered by GitBook
1 of 4

Loading...

Loading...

Loading...

Loading...

DeferredTypeDiagnostic

Class in Yarn.Compiler

Inherits from System.Object

Summary

Represents a potential type error diagnostic message.

public class DeferredTypeDiagnostic

Remarks

Because a variable can be declared in a scope different from the current yarn file, or even externally, when we first hit upon any variables of which we don't know the type of we create a deferred diagnostic. The idea being that we are hoping another file or step will give the information needed to resolved the type. Later once the compiler has finished parsing every file we can see if any of these weren't resolved. If they were not they will be promoted into a full diagnostic and presented to the user.

Methods

Name
Description

Properties

Name
Description

CreateDeferredTypeDiagnostic(string,Diagnostic)

Convenience method for constructing new deferred type diagnostics

diagnostic

The Diagnostic that has been deferred.

Name

The name of the variable who's type error is being deferred

diagnostic

Property in DeferredTypeDiagnostic

Summary

The Diagnostic that has been deferred.

public Diagnostic diagnostic { get; set; }

Name

Property in DeferredTypeDiagnostic

Summary

The name of the variable who's type error is being deferred

public string Name { get; internal set; }

CreateDeferredTypeDiagnostic(string,Diagnostic)

Method in

Summary

Convenience method for constructing new deferred type diagnostics

Parameters
Name
Description

string name

The name of the variable

diagnostic

The diagnostic that has been deferred

public static DeferredTypeDiagnostic CreateDeferredTypeDiagnostic(string name, Diagnostic diagnostic)
DeferredTypeDiagnostic
Yarn.Compiler.Diagnostic