Declaration

Class in Yarn.Compiler

Inherits from System.Object

Summary

Represents a variable declaration

public class Declaration

Fields

NameDescription
ExternalDeclarationThe string used for SourceFileName if the Declaration was found outside of a Yarn source file.

Methods

NameDescription
CreateVariable(string,IType,IConvertible,string?)Creates a new instance of the Declaration class, using the given name, type and default value.
ToString()

Properties

NameDescription
DefaultValueGets the default value of this Declaration , if no value has been specified in code or is available from a Dialogue ‘s IVariableStorage .
DependenciesGets the collection of Declaration objects that this Declaration depends upon the value of.
DependentsGets the collection of Declaration objects whose value depends upon this Declaration .
DescriptionGets a string describing the purpose of this Declaration .
InitialValueParserContextGets 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.)
IsImplicitGets a value indicating whether this Declaration was implicitly inferred from usage.
IsInlineExpansionGets a value indicating that this Declaration does not refer to a stored variable, and instead represents an inline-expanded expression (a ‘smart variable’).
IsVariableGets a value indicating whether this Declaration represents a variable, and not a function.
NameGets the name of this Declaration.
RangeGets the range of text at which this declaration occurs.
SourceFileLineGets the line number at which this Declaration was found in the source file.
SourceFileNameGets the name of the file in which this Declaration was found.
SourceNodeNameGets the name of the node in which this Declaration was found.
TypeGets the type of the variable, as represented by an object that implements IType .