Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

FileParseResult

Contains the result of parsing a single file of source code.
public struct FileParseResult : ISourceInput

Inherits from System.ValueType

Implements Yarn.Compiler.ISourceInput

This class provides only syntactic information about a parse - that is, it provides access to the parse tree, and the stream of tokens used to produce that parse tree.

#Constructors

#FileParseResult(string, IParseTree, CommonTokenStream, IEnumerable<Diagnostic>)

Initializes a new instance of the FileParseResult struct.
public FileParseResult(string name, IParseTree tree, CommonTokenStream tokens, IEnumerable<Diagnostic> diagnostics)

Parameters

  • namestring
    The name of the file.
  • treeIParseTree
    The parse tree extracted from the file.
  • tokensCommonTokenStream
    The tokens extracted from the file.
  • diagnosticsSystem.Collections.Generic.IEnumerable<Yarn.Compiler.Diagnostic>
    The diagnostics produced from parsing the file.

#Properties

#Diagnostics

The tokens extracted from the file.
public IEnumerable<Diagnostic> Diagnostics { get; }

Type IEnumerable

#Name

The name of the file.
public string Name { get; }

Type String

#Tokens

The tokens extracted from the file.
public CommonTokenStream Tokens { get; }

Type CommonTokenStream

#Tree

The parse tree extracted from the file.
public IParseTree Tree { get; }

Type IParseTree

#Methods

#Equals(object)

public override bool Equals(object obj)

Parameters

  • objobject

Returns Boolean

#GetHashCode()

public override int GetHashCode()

Returns Int32

Generated from Yarn Spinner for Unity 3.3.