stmt

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package stmt defines statements of the yack language.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowObjects

type AllowObjects struct {
	Allow bool
}

func (*AllowObjects) Execute

func (s *AllowObjects) Execute(ctx Context)

func (*AllowObjects) String

func (s *AllowObjects) String() string

type Choice

type Choice struct {
	Index     int
	Text      string
	GotoLabel string
}

func (*Choice) Execute

func (s *Choice) Execute(ctx Context)

func (*Choice) String

func (s *Choice) String() string

type Context

type Context interface {
	ShutUp()
	Say(actor, text string)
	Pause(seconds float64)
	Parrot(enabled bool)
	WaitFor(actor string)
	WaitWhile(codeCondition string)
	Dialog(actor string)
	Override(label string)
	AllowObjects(allow bool)
	Limit(n int)
	Goto(label string)
	Execute(code string)
	Choice(index int, text, gotoLabel string)
}

type Dialog

type Dialog struct {
	Actor string
}

func (*Dialog) Execute

func (s *Dialog) Execute(ctx Context)

func (*Dialog) String

func (s *Dialog) String() string

type Execute

type Execute struct {
	Code string
}

func (*Execute) Execute

func (s *Execute) Execute(ctx Context)

func (*Execute) String

func (s *Execute) String() string

type Goto

type Goto struct {
	Label string
}

func (*Goto) Execute

func (s *Goto) Execute(ctx Context)

func (*Goto) String

func (s *Goto) String() string

type Limit

type Limit struct {
	N int
}

func (*Limit) Execute

func (s *Limit) Execute(ctx Context)

func (*Limit) String

func (s *Limit) String() string

type Override

type Override struct {
	Label string
}

func (*Override) Execute

func (s *Override) Execute(ctx Context)

func (*Override) String

func (s *Override) String() string

type Parrot

type Parrot struct {
	Enabled bool
}

func (*Parrot) Execute

func (s *Parrot) Execute(ctx Context)

func (*Parrot) String

func (s *Parrot) String() string

type Pause

type Pause struct {
	Seconds float64
}

func (*Pause) Execute

func (s *Pause) Execute(ctx Context)

func (*Pause) String

func (s *Pause) String() string

type Say

type Say struct {
	Actor             string
	Text              string
	OptionalGotoLabel string
}

func (*Say) Execute

func (s *Say) Execute(ctx Context)

func (*Say) String

func (s *Say) String() string

type ShutUp

type ShutUp struct{}

func (*ShutUp) Execute

func (s *ShutUp) Execute(ctx Context)

func (*ShutUp) String

func (s *ShutUp) String() string

type Statement added in v0.3.1

type Statement interface {
	Execute(ctx Context)
	String() string
}

Statement is an executable statement in a dialog script.

type WaitFor

type WaitFor struct {
	Actor string
}

func (*WaitFor) Execute

func (s *WaitFor) Execute(ctx Context)

func (*WaitFor) String

func (s *WaitFor) String() string

type WaitWhile

type WaitWhile struct {
	CodeCondition string
}

func (*WaitWhile) Execute

func (s *WaitWhile) Execute(ctx Context)

func (*WaitWhile) String

func (s *WaitWhile) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL