FileParseResult
Contains the result of parsing a single file of source code.
public struct FileParseResult : ISourceInputInherits 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
namestringThe name of the file.treeIParseTreeThe parse tree extracted from the file.tokensCommonTokenStreamThe 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.