All pages
Powered by GitBook
1 of 8

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

StringTable

Property in CompilationResult

Summary

Gets a dictionary mapping line IDs to StringInfo objects.

public IDictionary<string, StringInfo> StringTable { get; internal set; }

Remarks

The string table contains the extracted line text found in the provided source code. The keys of this dictionary are the line IDs for each line - either through explicit line tags indicated through the #line: tag, or implicitly-generated line IDs that the compiler added during compilation.

DebugInfo

Property in CompilationResult

Summary

Gets the collection of DebugInfo objects for each node in Program .

public IReadOnlyDictionary<string, DebugInfo> DebugInfo { get; internal set; }

CompilationResult

Struct in Yarn.Compiler

Inherits from System.ValueType

Summary

The result of a compilation.

public struct CompilationResult

Remarks

Instances of this struct are produced as a result of supplying a to .

Properties

Name
Description

Program

Property in CompilationResult

Summary

Gets the compiled Yarn program that the Compiler produced.

public Program Program { get; internal set; }

Remarks

This value will be null if there were errors in the compilation. If this is the case, will contain information describing the errors.

It will also be null if the object's value was not .

FileTags

Property in

Summary

Gets the collection of file-level tags found in the source code.

Remarks

ContainsImplicitStringTags

Property in

Summary

Gets a value indicating whether the compiler had to create line IDs for lines in the source code that lacked #line: tags.

Diagnostics
CompilationJob
CompilationType
FullCompilation
The keys of this dictionary are the file names (as indicated by the FileName property of the CompilationJob 's Files collection), and the values are the file tags associated with that file.
public Dictionary<string, IEnumerable<string>> FileTags { get; internal set; }
CompilationResult
Remarks

Every line is required to have a line ID. If a line doesn't have a line ID specified in the source code (via a #line: tag), the compiler will create one.

Implicit line IDs are guaranteed to remain the same between compilations when the source file does not change. If you want line IDs to remain the same when the source code may be modified in the future, add a #line: tag to the line. This may be done by hand, or added using the AddTagsToLines(string,ICollection<string>) method.

public bool ContainsImplicitStringTags { get; internal set; }
CompilationResult

Gets a dictionary mapping line IDs to StringInfo objects.

ContainsImplicitStringTags

Gets a value indicating whether the compiler had to create line IDs for lines in the source code that lacked #line: tags.

DebugInfo

Gets the collection of DebugInfo objects for each node in Program .

Declarations

Gets the collection of variable declarations that were found during compilation.

Diagnostics

Gets the collection of Diagnostic objects that describe problems in the source code.

FileTags

Gets the collection of file-level tags found in the source code.

Program

Gets the compiled Yarn program that the Compiler produced.

CompilationJob
Compile(CompilationJob)
StringTable

Declarations

Property in CompilationResult

Summary

Gets the collection of variable declarations that were found during compilation.

public IEnumerable<Declaration> Declarations { get; internal set; }

Remarks

This value will be null if the object's value was not or .

CompilationJob
CompilationType
DeclarationsOnly
FullCompilation

Diagnostics

Property in CompilationResult

Summary

Gets the collection of Diagnostic objects that describe problems in the source code.

public IEnumerable<Diagnostic> Diagnostics { get; internal set; }

Remarks

If the compiler encounters errors while compiling source code, the it produces will have a value of null . To help figure out what the error is, users should consult the contents of this property.

CompilationResult
Program