object

package
v0.0.0-...-fe99f90 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INTEGER_OBJ = "INTEGER"
	DICE_OBJ    = "DICE"
	ERROR_OBJ   = "ERROR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiceData

type DiceData struct {
	Literal    string
	Tags       []string
	RawRolls   []uint32
	FinalRolls []uint32
	Value      int64
}

func (*DiceData) Inspect

func (dd *DiceData) Inspect() string

func (*DiceData) IsEqualTo

func (dd *DiceData) IsEqualTo(other DiceData) bool

func (*DiceData) Type

func (dd *DiceData) Type() ObjectType

type Error

type Error struct {
	Message string
}

func (*Error) Inspect

func (e *Error) Inspect() string

func (*Error) Type

func (e *Error) Type() ObjectType

type Integer

type Integer struct {
	Value int64
}

func (*Integer) Inspect

func (i *Integer) Inspect() string

func (*Integer) Type

func (i *Integer) Type() ObjectType

type Metadata

type Metadata struct {
	Store map[string]DiceData
}

func NewMetadata

func NewMetadata() *Metadata

func (*Metadata) Add

func (m *Metadata) Add(literal string, val DiceData)

type Object

type Object interface {
	Type() ObjectType
	Inspect() string
}

type ObjectType

type ObjectType string

Jump to

Keyboard shortcuts

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