lang: ast, interfaces, interpret: Table should be a well-known type
We use this in enough places, that it's nice to have it as a well-known alias.
This commit is contained in:
@@ -94,7 +94,7 @@ type Stmt interface {
|
||||
// Output returns the output that this "program" produces. This output
|
||||
// is what is used to build the output graph. It requires the input
|
||||
// table of values that are used to populate each function.
|
||||
Output(map[Func]types.Value) (*Output, error)
|
||||
Output(Table) (*Output, error)
|
||||
}
|
||||
|
||||
// Expr represents an expression in the language. Expr implementations must have
|
||||
|
||||
@@ -44,6 +44,9 @@ import (
|
||||
// FuncSig is the simple signature that is used throughout our implementations.
|
||||
type FuncSig = func(context.Context, []types.Value) (types.Value, error)
|
||||
|
||||
// Table is the type of language table fields.
|
||||
type Table = map[Func]types.Value
|
||||
|
||||
// GraphSig is the simple signature that is used throughout our implementations.
|
||||
// TODO: Rename this?
|
||||
type GraphSig = func(Txn, []Func) (Func, error)
|
||||
|
||||
Reference in New Issue
Block a user