package
0.1.0-alpha
Repository: https://github.com/wingerjc/tableman-golang.git
Documentation: pkg.go.dev

# Functions

EvaluateExpression Evaluates an expression with the given execution context outside of a Program.
NewExpression creates a new expression Evallable.
NewFunction creates a function Evallable, erroring if it can on the format of the parameters.
NewIntResult creates a new int-valued result.
NewListExpression creates a new list of epxressions for a row.
NewNumber creates a new numeric Evallable.
NewProgram creates a new program from a keyed set of tablepacks.
NewRange creates a new range value.
NewRoll creates a new roll value.
NewRollCountAggr creates a new roll count aggregator.
NewRollHistory creates a new RollHistory object.
NewRollSelect creates a new high/low roll selector.
NewRootExecutionContext creates an empty ExecutionContext that is ready to be used, with empty history and the default random generator.
NewString creates a new string evallable.
NewStringResult creates a new string-valued result.
NewTable creates a new table object.
NewTableCall creates a new table call Evallable.
NewTablePack creates a new TablePack with the given tables.
NewTableRow creates a new TableRow object.
NewTestRandSource creates a new random source for testing pre-populated with the passsed values.
NewVariable creates a new variable access Evallable.

# Constants

AnyTypeResult can be used in type matching to take any result value.
IntResult can be used to define or matche to number/integer results.
RootPack is the default key for table calls.
StringResult can be used to define or match to string expression results.

# Structs

DefaultRandSource is a RandomSource that uses rand.Intn.
ExecutionContext is a runtime context for scoping variable values, keepina consistent random number generator and referencing other tables.
An Expression is an Evallable with for an expression.
ExpressionResult is a final result for an evaluated expression.
FunctionDef is a way to define a function so it can be used in a modular way.
GenericFunction allows a simple FunctionDef to be wrapped for simpler definitions.
ListExpression is an Evallable that wraps all the items for a table row.
Number is an Evallable for a numeric constant.
Program is a set of TablePacks that can evaluate expressions as programs.
Range is a low-high number range.
Roll is an Evallable roll expression value.
RollCountAggr is an aggregator for counting how many of a given number is rolled.
RollHistory is a list of all roll results in string format.
RollSelect is a roll selector for the highest or lowest N dice.
String is an Evallable for a string value.
Table is a program unit that can randomly and deterministically return row Evallable objects.
TableCall is an Evallable for calls to a table.
TablePack represents a single executable tableman source file.
TableRow is an Evallable row for a tableman table.
TestingRandSource is an implementation of RandomSource that uses a predefined list of values.
Variable is an evallable for a variable access.

# Interfaces

Evallable is an interface for a loaded program unit to provide an executable ExpressionEval during program execution.
ExpressionEval is an interface for evaluating any program node.
RandomSource is a customizable randoom source for replacing for tests or seeding.

# Type aliases

ResultType is an alias for allowed return types from an expression.
TableMap is a type alias for mapping file hash keys to table definitions.