debug

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Code generated by Tapestry; edit at your own risk.

Index

Constants

This section is empty.

Variables

View Source
var (
	T = literal.T

	CmdError    = assign.CmdError
	CmdErrorCtx = assign.CmdErrorCtx
)
View Source
var Stepper func(words string) error

a callback so fabricate can trigger a step of the parser; fabricate will error if this is nil/unset. ( see also: cmdcheck )

View Source
var Z_Types = typeinfo.TypeSet{
	Name:       "debug",
	Flow:       z_flow_list,
	Str:        z_str_list,
	Signatures: z_signatures,
}

package listing of type data

View Source
var Zt_DebugLog typeinfo.Flow

debug_log, a type of flow.

View Source
var Zt_DoNothing typeinfo.Flow

do_nothing, a type of flow.

View Source
var Zt_Expect typeinfo.Flow

expect, a type of flow.

View Source
var Zt_ExpectOutput typeinfo.Flow

expect_output, a type of flow.

View Source
var Zt_ExpectText typeinfo.Flow

expect_text, a type of flow.

View Source
var Zt_Fabricate typeinfo.Flow

fabricate, a type of flow.

View Source
var Zt_LoggingLevel = typeinfo.Str{
	Name: "logging_level",
	Options: []string{
		"note",
		"debug",
		"info",
		"warn",
		"error",
	},
}

logging_level, a type of str enum.

Functions

func SplitLines

func SplitLines(str string) []string

func Stringify

func Stringify(v rt.Value) (ret string)

turn a tapestry generic value into a json(ish) formatted string

Types

type DebugLog

type DebugLog struct {
	LogLevel LoggingLevel
	Value    rtti.Assignment
	Markup   map[string]any
}

Debug log.

func (*DebugLog) Execute

func (op *DebugLog) Execute(run rt.Runtime) (err error)

func (*DebugLog) GetMarkup

func (op *DebugLog) GetMarkup(ensure bool) map[string]any

implements typeinfo.Markup

func (*DebugLog) TypeInfo

func (*DebugLog) TypeInfo() typeinfo.T

implements typeinfo.Instance

type DebugLog_Slice

type DebugLog_Slice []DebugLog

holds a slice of type debug_log

func (*DebugLog_Slice) Repeats

func (op *DebugLog_Slice) Repeats() bool

implements typeinfo.Repeats

func (*DebugLog_Slice) TypeInfo

func (*DebugLog_Slice) TypeInfo() typeinfo.T

implements typeinfo.Instance

type DoNothing

type DoNothing struct {
	Markup map[string]any
}

a command with a signature of the comment marker metadata. a cheat to allows nodes that have only a comment marker and no actual command. see also: story.story_break

func (DoNothing) Execute

func (DoNothing) Execute(rt.Runtime) error

func (*DoNothing) GetMarkup

func (op *DoNothing) GetMarkup(ensure bool) map[string]any

implements typeinfo.Markup

func (*DoNothing) TypeInfo

func (*DoNothing) TypeInfo() typeinfo.T

implements typeinfo.Instance

type DoNothing_Slice

type DoNothing_Slice []DoNothing

holds a slice of type do_nothing

func (*DoNothing_Slice) Repeats

func (op *DoNothing_Slice) Repeats() bool

implements typeinfo.Repeats

func (*DoNothing_Slice) TypeInfo

func (*DoNothing_Slice) TypeInfo() typeinfo.T

implements typeinfo.Instance

type Expect

type Expect struct {
	Value  rtti.BoolEval
	Markup map[string]any
}

func (*Expect) Execute

func (op *Expect) Execute(run rt.Runtime) (err error)

func (*Expect) GetMarkup

func (op *Expect) GetMarkup(ensure bool) map[string]any

implements typeinfo.Markup

func (*Expect) TypeInfo

func (*Expect) TypeInfo() typeinfo.T

implements typeinfo.Instance

type ExpectOutput

type ExpectOutput struct {
	Output string
	Markup map[string]any
}

func (*ExpectOutput) Execute

func (op *ExpectOutput) Execute(run rt.Runtime) (err error)

func (*ExpectOutput) GetMarkup

func (op *ExpectOutput) GetMarkup(ensure bool) map[string]any

implements typeinfo.Markup

func (*ExpectOutput) TypeInfo

func (*ExpectOutput) TypeInfo() typeinfo.T

implements typeinfo.Instance

type ExpectOutput_Slice

type ExpectOutput_Slice []ExpectOutput

holds a slice of type expect_output

func (*ExpectOutput_Slice) Repeats

func (op *ExpectOutput_Slice) Repeats() bool

implements typeinfo.Repeats

func (*ExpectOutput_Slice) TypeInfo

func (*ExpectOutput_Slice) TypeInfo() typeinfo.T

implements typeinfo.Instance

type ExpectText

type ExpectText struct {
	Text   rtti.TextEval
	Markup map[string]any
}

func (*ExpectText) Execute

func (op *ExpectText) Execute(run rt.Runtime) (err error)

func (*ExpectText) GetMarkup

func (op *ExpectText) GetMarkup(ensure bool) map[string]any

implements typeinfo.Markup

func (*ExpectText) TypeInfo

func (*ExpectText) TypeInfo() typeinfo.T

implements typeinfo.Instance

type ExpectText_Slice

type ExpectText_Slice []ExpectText

holds a slice of type expect_text

func (*ExpectText_Slice) Repeats

func (op *ExpectText_Slice) Repeats() bool

implements typeinfo.Repeats

func (*ExpectText_Slice) TypeInfo

func (*ExpectText_Slice) TypeInfo() typeinfo.T

implements typeinfo.Instance

type Expect_Slice

type Expect_Slice []Expect

holds a slice of type expect

func (*Expect_Slice) Repeats

func (op *Expect_Slice) Repeats() bool

implements typeinfo.Repeats

func (*Expect_Slice) TypeInfo

func (*Expect_Slice) TypeInfo() typeinfo.T

implements typeinfo.Instance

type Fabricate

type Fabricate struct {
	Text   rtti.TextEval
	Markup map[string]any
}

fake input as if the player had typed it themselves. only works while running checks.

func (*Fabricate) Execute

func (op *Fabricate) Execute(run rt.Runtime) (err error)

func (*Fabricate) GetMarkup

func (op *Fabricate) GetMarkup(ensure bool) map[string]any

implements typeinfo.Markup

func (*Fabricate) TypeInfo

func (*Fabricate) TypeInfo() typeinfo.T

implements typeinfo.Instance

type Fabricate_Slice

type Fabricate_Slice []Fabricate

holds a slice of type fabricate

func (*Fabricate_Slice) Repeats

func (op *Fabricate_Slice) Repeats() bool

implements typeinfo.Repeats

func (*Fabricate_Slice) TypeInfo

func (*Fabricate_Slice) TypeInfo() typeinfo.T

implements typeinfo.Instance

type GreatExpectations

type GreatExpectations interface {
	// gets and resets the most recent game output
	GetAccumulatedOutput() []string
}

an optional interface runtimes can implement for testing

type LoggingLevel

type LoggingLevel int

LoggingLevel, a type of str enum.

const (
	C_LoggingLevel_Note LoggingLevel = iota
	C_LoggingLevel_Debug
	C_LoggingLevel_Info
	C_LoggingLevel_Warn
	C_LoggingLevel_Error
)

enumerated values of LoggingLevel

LogLevel controls how much debugging to print logs only at the named level and higher.

func MakeLoggingLevel

func MakeLoggingLevel(str string) (ret LoggingLevel, okay bool)

func (LoggingLevel) String

func (op LoggingLevel) String() (ret string)

Jump to

Keyboard shortcuts

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