All pages
Powered by GitBook
1 of 18

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

ToString()

Method in

public override string ToString()

Summary

Declaration

Description

Property in

Gets a string describing the purpose of this .

public string? Description { get; internal set; }

Summary

Declaration
Declaration

ExternalDeclaration

Field in

The string used for if the Declaration was found outside of a Yarn source file.

SourceFileLine

Property in

Gets the line number at which this Declaration was found in the source file.

If this was not found in a Yarn source file, this will be -1.

public const string ExternalDeclaration = "(External)";

Summary

Declaration
SourceFileName
public int SourceFileLine { get }

Summary

Remarks

Declaration
Declaration

IsImplicit

Property in

Gets a value indicating whether this Declaration was implicitly inferred from usage.

public bool IsImplicit { get; internal set; }

Summary

Declaration

DefaultValue

Property in

Gets the default value of this , if no value has been specified in code or is available from a 's .

InitialValueParserContext

Property in

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.)

Range

Property in

Gets the range of text at which this declaration occurs.

This range refers to the declaration of the symbol itself, and not any syntax surrounding it. For example, the declaration <<declare $x = 1>> would have a Range referring to the $x symbol.

public IConvertible? DefaultValue { get; internal set; }

Summary

Declaration
Declaration
Dialogue
IVariableStorage
public YarnSpinnerParser.ExpressionContext? InitialValueParserContext { get; set; }

Summary

Declaration
public Range Range { get; internal set; }

Summary

Remarks

Declaration

Dependencies

Property in

Gets the collection of objects that this depends upon the value of.

SourceFileName

Property in

Gets the name of the file in which this Declaration was found.

If this was not found in a Yarn source file, this will be .

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

Summary

Declaration
Declaration
Declaration
public string SourceFileName { get; internal set; }

Summary

Remarks

Declaration
Declaration
ExternalDeclaration

Name

Property in

Gets the name of this Declaration.

public string Name { get; internal set; }

Summary

Declaration

SourceNodeName

Property in

Gets the name of the node in which this Declaration was found.

If this was not found in a Yarn source file, this will be null .

Dependents

Property in

Gets the collection of objects whose value depends upon this .

IsVariable

Property in

Gets a value indicating whether this Declaration represents a variable, and not a function.

public string? SourceNodeName { get; internal set; }

Summary

Remarks

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

Summary

Declaration
Declaration
Declaration
public bool IsVariable { get }

Summary

Declaration

Type

Property in

Gets the type of the variable, as represented by an object that implements .

public IType Type { get; internal set; }

Summary

Declaration
IType

IsInlineExpansion

Property in Declaration

Summary

Gets a value indicating that this Declaration does not refer to a stored variable, and instead represents an inline-expanded expression (a 'smart variable').

public bool IsInlineExpansion { get; internal set; }

Declaration

Class in Yarn.Compiler

Inherits from System.Object

Summary

Represents a variable declaration

public class Declaration

Fields

Name
Description

The string used for if the Declaration was found outside of a Yarn source file.

Methods

Name
Description
Name
Description

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.

Properties

ExternalDeclaration
SourceFileName

Gets the collection of objects whose value depends upon this .

Gets a string describing the purpose of this .

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.

Gets the type of the variable, as represented by an object that implements .

CreateVariable(string,IType,IConvertible,string?)
Declaration
ToString()
DefaultValue
Declaration
Dialogue
IVariableStorage
Dependencies
Declaration
Declaration
Dependents
Declaration
Declaration
Description
Declaration
InitialValueParserContext
IsImplicit
IsInlineExpansion
IsVariable
Name
Range
SourceFileLine
SourceFileName
SourceNodeName
Type
IType

CreateVariable(string,IType,IConvertible,string?)

Method in Declaration

Summary

Creates a new instance of the Declaration class, using the given name, type and default value.

public static Declaration CreateVariable(string name, IType type, IConvertible defaultValue, string? description = null)

Parameters

Name
Description

string name

The name of the new declaration.

A new instance of the class.

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.

Returns

Declaration
Yarn.IType