Documentation
¶
Index ¶
- Constants
- type CallStatement
- type Clause
- type CommandStatement
- type CommandStatementElement
- type DeclareStatement
- type Dialogue
- type Expression
- type FunctionCall
- type IfStatement
- type JumpStatement
- type LineFormattedText
- type LineFormattedTextElement
- type LineStatement
- type Node
- type SetStatement
- type ShortcutOption
- type ShortcutOptionStatement
- type Statement
Constants ¶
View Source
const ( MultiplicationBinaryOperator = iota DivisionBinaryOperator ModuloBinaryOperator AdditionBinaryOperator SubtractionBinaryOperator LessThanEqualsBinaryOperator GreaterThanEqualsBinaryOperator LessBinaryOperator GreaterBinaryOperator EqualsBinaryOperator NotEqualsBinaryOperator AndBinaryOperator OrBinaryOperator XorBinaryOperator AssignmentInPlaceOperator = iota MultiplicationInPlaceOperator DivisionInPlaceOperator ModuloInPlaceOperator AdditionInPlaceOperator SubtractionInPlaceOperator )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallStatement ¶
type CallStatement struct {
*FunctionCall
}
type Clause ¶
type Clause struct { Condition *Expression Statements []*Statement }
type CommandStatement ¶
type CommandStatement struct {
Elements []*CommandStatementElement
}
type CommandStatementElement ¶
type CommandStatementElement struct { Expression *Expression // contains filtered or unexported fields }
type DeclareStatement ¶
type DeclareStatement struct { VariableID string Value *Expression }
type Dialogue ¶
type Dialogue struct {
Nodes []Node
}
func FromReader ¶
FromReader creates a dialogue tree by reading the content of reader.
func FromReaders ¶
FromReaders creates a dialogue tree by reading the content of readers.
type Expression ¶
type Expression struct { Value *variable.Value VariableID *string FunctionCall *FunctionCall NegativeExpression *Expression NotExpression *Expression LeftOperand, RightOperand *Expression Operator *int }
Expression represents something that can be evaluated to a YarnSpinner value when a Dialogue is run.
func NewStringExpression ¶
func NewStringExpression(str string) *Expression
NewStringExpression creates a new expression holding a constant string.
type FunctionCall ¶
type FunctionCall struct { FunctionID string Arguments []*Expression }
FunctionCall is used to represent the call of a function from a YarnSpinner script.
type IfStatement ¶
type IfStatement struct {
Clauses []*Clause
}
type JumpStatement ¶
type JumpStatement struct {
Expression *Expression
}
type LineFormattedText ¶
type LineFormattedText struct {
Elements []*LineFormattedTextElement
}
type LineFormattedTextElement ¶
type LineFormattedTextElement struct { Text string Expression *Expression }
type LineStatement ¶
type LineStatement struct { Text *LineFormattedText Condition *Expression Tags []string }
type SetStatement ¶
type SetStatement struct { VariableID string InPlaceOperator int Expression *Expression }
type ShortcutOption ¶
type ShortcutOption struct { LineStatement *LineStatement Statements []*Statement }
type ShortcutOptionStatement ¶
type ShortcutOptionStatement struct {
Options []*ShortcutOption
}
type Statement ¶
type Statement struct { LineStatement *LineStatement ShortcutOptionStatement *ShortcutOptionStatement SetStatement *SetStatement JumpStatement *JumpStatement IfStatement *IfStatement CommandStatement *CommandStatement CallStatement *CallStatement DeclareStatement *DeclareStatement }
Click to show internal directories.
Click to hide internal directories.