Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Contains classes for compiling Yarn code.
A basic block is a run of instructions inside a Node. Basic blocks group instructions up into segments such that execution only ever begins at the start of a block (that is, a program never jumps into the middle of a block), and execution only ever leaves at the end of a block.
The result of a compilation.
Compiles Yarn code.
Represents a variable declaration
A diagnostic message that describes an error, warning or informational message that the user can take action on.
A Lexer subclass that detects newlines and generates indent and dedent tokens accordingly.
Contains debug information for a node in a Yarn file.
Represents a position in a multi-line string.
Yarn Projects represent instructions on where to find Yarn scripts and associated assets, and how they should be compiled.
Represents a range of text in a multi-line string.
Contains methods for parsing structured commands.
Utility methods for working with line tags.
Contains properties common to all parse nodes that have a type associated with them.
Contains classes for upgrading Yarn code to more recent versions of the language.
An object that contains Yarn source code to compile, and instructions on how to compile it.
Contains the result of parsing a single file of source code.
Information about a string. Stored inside a string table, which is produced from the Compiler.
Class in Yarn.Compiler
Inherits from System.Object
A basic block is a run of instructions inside a Node. Basic blocks group instructions up into segments such that execution only ever begins at the start of a block (that is, a program never jumps into the middle of a block), and execution only ever leaves at the end of a block.
A command that will be executed.
A line of dialogue that should be shown to the player.
A collection of options that should be shown to the player.
An abstract class that represents some content that is shown to the player.
Gets the Node that this block was extracted from.
Adds a new destination to this block, that points to a node.
Adds a new destination to this block that points to a node, with a option's line ID for context.
Adds a new destination to this block, that points to another block.
Adds a new destination to this block that points at any other node in the program.
Get the ancestors of this block - that is, blocks that may run immediately before this block.
Gets all descendants (that is, destinations, and destinations of those destinations, and so on), recursively.
Gets all descendants (that is, destinations, and destinations of those destinations, and so on) that have any player-visible content, recursively.
Gets the destinations of this block - that is, blocks or nodes that may run immediately after this block.
Gets the index of the first instruction of the node that this block is in.
Gets the Instructions that form this block.
Gets the name of the label that this block begins at, or null if this basic block does not begin at a labelled instruction.
Gets a descriptive name for the block.
Gets the name of the node that this block is in.
Gets the collection of player-visible content that will be delivered when this block is run.
Method in BasicBlock
Adds a new destination to this block, that points to a node.
string
nodeName
The name of the destination node.
condition
The condition under which descendant
will be run.
Method in BasicBlock
Adds a new destination to this block that points to a node, with a option's line ID for context.
descendant
The new descendant node.
condition
The condition under which the node descendant
will be run.
string
lineID
The line ID of the option that must be selected in order for descendant
to run.
Method in BasicBlock
Adds a new destination to this block, that points to another block.
descendant
The new descendant node.
condition
The condition under which descendant
will be run.
Provides methods for constructing objects.
Provides methods for constructing objects.
Provides methods for constructing objects.
Contains extension methods for producing objects from a Node.
A destination represents a or node that may be run, following the execution of a .
The conditions under which a may be reached at the end of a BasicBlock.
Gets a string containing the textual description of the instructions in this .
Property in BasicBlock
Get the ancestors of this block - that is, blocks that may run immediately before this block.
Property in BasicBlock
Gets all descendants (that is, destinations, and destinations of those destinations, and so on), recursively.
Cycles are detected and avoided.
Method in BasicBlock
Adds a new destination to this block that points at any other node in the program.
returnToBlock
Method in BasicBlock
Gets a string containing the textual description of the instructions in this BasicBlock .
library
The to use when converting instructions to strings.
compilationResult
The that produced .
A string containing the text version of the instructions.
Property in BasicBlock
Gets the collection of player-visible content that will be delivered when this block is run.
Player-visible content means lines, options and commands. When this block is run, the entire contents of this collection will be displayed to the player, in the same order as they appear in this collection.
If this collection is empty, then the block contains no visible content. This is the case for blocks that only contain logic, and do not contain any lines, options or commands.
To tell the difference between the different kinds of content, use the is
operator to check the type of each item:
Property in BasicBlock
Gets a descriptive name for the block.
If this block begins at a labelled instruction, the name will be [NodeName].[LabelName]
. Otherwise, it will be [NodeName].[FirstInstructionIndex]
.
Enumeration Member in Condition
The Destination is reached because an expression evaluated to false.
Class in BasicBlock
Inherits from Destination
The block that this destination refers to.
Class in BasicBlock
Inherits from PlayerVisibleContentElement
A command that will be executed.
The text of the command.
Property in Destination
When this destination is taken, if this value is non-null, a VM should push this block onto the call stack. When a Return instruction is reached, pop a block off the call stack and return to it. If the value is null, the VM should clear the call stack.
Class in BasicBlock
Inherits from PlayerVisibleContentElement
A line of dialogue that should be shown to the player.
The string table ID of the line that will be shown to the player.
Yarn.Compiler.BasicBlock block
Yarn.Compiler.BasicBlock.Condition condition
Enum in BasicBlock
Inherits from System.Enum
The conditions under which a Destination may be reached at the end of a BasicBlock.
The Destination is reached beacuse of an explicit instruction to go to this block or node.
The Destination is reached because an expression evaluated to false.
The Destination is reached because an expression evaluated to true.
The Destination is reached because the preceding BasicBlock reached the end of its execution, and the Destination's target is the block immediately following.
The Destination is reached because the player made an in-game choice to go to it.
The name of the node that this destination refers to.
Enumeration Member in Condition
The Destination is reached beacuse of an explicit instruction to go to this block or node.
Property in NodeDestination
The name of the node that this destination refers to.
This value is only valid when System.Type
is DestinationType.Node
.
Enumeration Member in Condition
The Destination is reached because the player made an in-game choice to go to it.
Class in BasicBlock
Inherits from BlockDestination
Class in BasicBlock
Inherits from System.Object
A destination represents a BasicBlock or node that may be run, following the execution of a BasicBlock .
Destination objects represent links between blocks, or between blocks and nodes.
The condition that causes this destination to be reached.
When this destination is taken, if this value is non-null, a VM should push this block onto the call stack. When a Return instruction is reached, pop a block off the call stack and return to it. If the value is null, the VM should clear the call stack.
Class in BasicBlock
Inherits from PlayerVisibleContentElement
A collection of options that should be shown to the player.
The collection of options that will be delivered to the player.
Represents a single option that may be presented to the player.
Class in BasicBlock
Inherits from System.Object
An abstract class that represents some content that is shown to the player.
This class is used, rather than the runtime classes Yarn.Line or Yarn.OptionSet, because when the program is being analysed, no values for any substitutions are available. Instead, these classes represent the data that is available offline.
Struct in Yarn.Compiler
Inherits from System.ValueType
An object that contains Yarn source code to compile, and instructions on how to compile it.
Instances of this struct are used with Compile(CompilationJob) to produce CompilationResult objects.
The type of compilation that the compiler will do.
The type of compilation to perform.
The declarations for variables.
Gets or sets the version of the Yarn language.
The collection of type declarations that should be imported and made available to the compiler, prior to compilation.
Represents the contents of a file to compile.
Struct in OptionsElement
Inherits from System.ValueType
Represents a single option that may be presented to the player.
The destination that will be run if this option is selected by the player.
The string table ID that will be shown to the player.
The structs that represent the content to parse..
The that contains declarations for functions.
Creates a new using the contents of a collection of files.
Creates a new using the contents of a collection of files.
Creates a new using the contents of a string.
System.Collections.Generic.IEnumerable<string>
paths
The paths to the files.
library
The containing functions to use for this compilation.
Method in CompilationJob
Creates a new CompilationJob using the contents of a string.
string
fileName
The name to assign to the compiled file.
string
source
The text to compile.
library
Library of function definitions to use during compilation.
int
languageVersion
The version of the Yarn language to use.
A new CompilationJob .
Method in CompilationJob
Creates a new CompilationJob using the contents of a collection of files.
string[]
paths
The paths to the files.
A new CompilationJob .
Struct in CompilationJob
Inherits from System.ValueType
Represents the contents of a file to compile.
The name of the file.
The source code of this file.
Class in Yarn.Compiler
Inherits from System.Object
The result of a compilation.
Instances of this class are produced as a result of supplying a CompilationJob to Compile(CompilationJob) .
Gets a value indicating whether this compilation result contains any error diagnostics.
Gets a value indicating whether the compiler had to create line IDs for lines in the source code that lacked #line:
tags.
Gets the collection of variable declarations that were found during compilation.
Gets the collection of file-level tags found in the source code.
Gets the debugging information for this compiled project.
Gets a dictionary mapping line IDs to StringInfo objects.
Gets a collection of any types that were defined by the user in the input (for example, user-defined enum types.)
Gets the collection of objects for each node in .
Gets the collection of objects that describe problems in the source code.
Gets the compiled Yarn program that the produced.
Property in CompilationResult
Gets the collection of variable declarations that were found during compilation.
This value will be null
if the CompilationJob object's CompilationType value was not TypeCheck or FullCompilation .
Property in CompilationResult
Gets the collection of Diagnostic objects that describe problems in the source code.
If the compiler encounters errors while compiling source code, the CompilationResult it produces will have a Program value of null
. To help figure out what the error is, users should consult the contents of this property.
Generate declarations only. This is equivalent to .
The compiler will do a full compilation, and generate a , function declaration set, and string table.
The compiler will generate a string table only.
The compiler will derive only the variable and function declarations, and file tags, found in the script.
Property in
Gets a value indicating whether the compiler had to create line IDs for lines in the source code that lacked #line:
tags.
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 method.
Property in
Gets a dictionary mapping line IDs to StringInfo objects.
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.
Property in CompilationResult
Gets a collection of any types that were defined by the user in the input (for example, user-defined enum types.)
Method in Compiler
Gets the text of the documentation comments that either immediately precede context
, or are on the same line as context
.
Documentation comments begin with a triple-slash ( ///
), and are used to describe variable declarations. If documentation comments precede a declaration (that is, they're not on the same line as the declaration), then they may span multiple lines, as long as each line begins with a triple-slash.
Antlr4.Runtime.CommonTokenStream
tokens
The token stream to search.
Antlr4.Runtime.ParserRuleContext
context
The parser rule context to get documentation comments for.
bool
allowCommentsAfter
If true, this method will search for documentation comments that come after context
's last token and are on the same line.
The text of the documentation comments, or null
if no documentation comments were present.
Class in Yarn.Compiler
Inherits from System.Object
Compiles Yarn code.
Compiles Yarn code, as specified by a compilation job.
Flattens a tree of Antlr4.Runtime.Tree.IParseTree
objects by recursively visiting their children, and converting them into a flat System.Collections.Generic.IEnumerable`1
.
Gets the text of the documentation comments that either immediately precede context
, or are on the same line as context
.
Generates a line id for a raw text node
Method in Compiler
Compiles Yarn code, as specified by a compilation job.
compilationJob
The compilation job to perform.
The results of the compilation.
CompilationJob: An object that contains Yarn source code to compile, and instructions on how to compile it.
CompilationResult: The result of a compilation.
Method in
Flattens a tree of Antlr4.Runtime.Tree.IParseTree
objects by recursively visiting their children, and converting them into a flat System.Collections.Generic.IEnumerable`1
.
An System.Collections.Generic.IEnumerable`1
that contains a flattened version of the hierarchy rooted at node
.
string
name
The name of the node
Antlr4.Runtime.Tree.IParseTree
node
The root node to begin work from.
Gets or sets the parser context for the initial value provided in this variable's 'declare' statement, if any. This is only valid for variable declarations, not functions (because functions don't have a value.)
Gets a value indicating whether this Declaration was implicitly inferred from usage.
Gets a value indicating that this Declaration does not refer to a stored variable, and instead represents an inline-expanded expression (a 'smart variable').
Gets a value indicating whether this Declaration represents a variable, and not a function.
Gets the name of this Declaration.
Gets the range of text at which this declaration occurs.
Gets the line number at which this Declaration was found in the source file.
Gets the name of the file in which this Declaration was found.
Gets the name of the node in which this Declaration was found.
string
name
The name of the new declaration.
type
The type of the declaration.
System.IConvertible
defaultValue
The default value of the declaration. This must be a string, a number (integer or floating-point), or boolean value.
string
description
The description of the new declaration.
The string used for if the Declaration was found outside of a Yarn source file.
Creates a new instance of the class, using the given name, type and default value.
Gets the default value of this , if no value has been specified in code or is available from a 's .
Gets the collection of objects that this depends upon the value of.
Gets the collection of objects whose value depends upon this .
Gets a string describing the purpose of this .
Gets the type of the variable, as represented by an object that implements .