Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNotationParser ¶
type DNotationParser struct {
// contains filtered or unexported fields
}
func NewDNotationParser ¶
func NewDNotationParser() (*DNotationParser, error)
func (*DNotationParser) DoParse ¶
func (p *DNotationParser) DoParse(input string) (*DNotationResult, error)
func (*DNotationParser) GetEBNF ¶
func (p *DNotationParser) GetEBNF() string
type DNotationResult ¶
type Expression ¶
func (*Expression) Eval ¶
func (e *Expression) Eval(baseRoller *roller.BaseRoller) (*DNotationResult, error)
type Factor ¶
func (*Factor) Eval ¶
func (d *Factor) Eval(baseRoller *roller.BaseRoller) (*DNotationResult, error)
type RollParser ¶ added in v1.3.0
type RollParser interface {
DoParse(string) (*DNotationResult, error)
}
RollParser interface to support parsing a d-notation roll & getting a result
type Term ¶
func (*Term) Eval ¶
func (t *Term) Eval(baseRoller *roller.BaseRoller) (*DNotationResult, error)
type Value ¶
type Value struct { Number int ` @(Number)` SubExpression *Expression `| "(" @@ ")"` }
func (*Value) Eval ¶
func (v *Value) Eval(roller *roller.BaseRoller) (*DNotationResult, error)
Click to show internal directories.
Click to hide internal directories.