parse

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(s string) ([]string, error)

Types

type Parser

type Parser struct {
	Quantity int
	Dice     []*roll.Die
	Operator string
	Modifier int
}

func NewParser

func NewParser(s string) (*Parser, error)

func (*Parser) Roll

func (p *Parser) Roll() int

Roll rolls the dice with modifiers found in the parsed string

func (*Parser) String

func (p *Parser) String() string

Jump to

Keyboard shortcuts

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