CompilationJob

Struct in Yarn.Compiler

Inherits from System.ValueType

Summary

An object that contains Yarn source code to compile, and instructions on how to compile it.

public struct CompilationJob

Remarks

Instances of this struct are used with Compile(CompilationJob) to produce CompilationResult objects.

Classes

NameDescription
FileRepresents the contents of a file to compile.

Enums

NameDescription
TypeThe type of compilation that the compiler will do.

Fields

NameDescription
CompilationTypeThe type of compilation to perform.
DeclarationsThe declarations for variables and functions.
Inputs
LibraryThe Library that contains declarations for functions.

Methods

NameDescription
CreateFromFiles(IEnumerable,Library?)Creates a new CompilationJob using the contents of a collection of files.
CreateFromFiles(string[])Creates a new CompilationJob using the contents of a collection of files.
CreateFromInputs(IEnumerable,Library?,int)Creates a new CompilationJob using the contents of a collection of source inputs.
CreateFromString(string,string,Library?,int)Creates a new CompilationJob using the contents of a string.

Properties

NameDescription
CancellationTokenA cancellation token that can be used to signal that the compilation should be cancelled.
FilesThe File structs that represent the content to parse..
LanguageVersionGets or sets the version of the Yarn language.
TypeDeclarationsThe collection of type declarations that should be imported and made available to the compiler, prior to compilation.
VariableDeclarationsThe declarations for variables.