lang: ast, interfaces, interpret: Change the Output sig
This plumbs through the new Output method signature that accepts a table of function pointers to values and relies on the previous storing of the function pointers to be used for the lookup right now. This has the elegant side-effect that Output generation could run in parallel with the graph engine, as the engine only needs to pause to take a snapshot of the current values tables. Co-authored-by: Samuel Gélineau <gelisam@gmail.com>
This commit is contained in:
@@ -76,8 +76,9 @@ type Stmt interface {
|
||||
Graph() (*pgraph.Graph, error)
|
||||
|
||||
// Output returns the output that this "program" produces. This output
|
||||
// is what is used to build the output graph.
|
||||
Output() (*Output, error)
|
||||
// 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)
|
||||
}
|
||||
|
||||
// Expr represents an expression in the language. Expr implementations must have
|
||||
|
||||
Reference in New Issue
Block a user