Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDanglingScope = fmt.Errorf("scopes stack is not empty: %w", io.EOF)
Return by Step if there are open scopes in the end of source code
Functions ¶
This section is empty.
Types ¶
type CommandError ¶
type CommandError struct {
// contains filtered or unexported fields
}
Return by Step if there an error returned by a command
func (CommandError) Error ¶
func (e CommandError) Error() string
func (CommandError) Unwrap ¶
func (e CommandError) Unwrap() error
type Computation ¶
Represent the computaion of a source code against specified state and commands
func New ¶
func New[T state.StateType]( ctx context.Context, state state.State[T], commandsMap map[rune]commands.Command[T], source io.ReadCloser, ) *Computation[T]
Return a new computaion. The reader get closed on cancelation or end of execution
func (*Computation[T]) Step ¶
func (c *Computation[T]) Step() error
Move the computaion one step forward.
type UnknownCommandError ¶
type UnknownCommandError struct {
// contains filtered or unexported fields
}
Return by Step if source contain an unknown command
func (UnknownCommandError) Error ¶
func (e UnknownCommandError) Error() string
Click to show internal directories.
Click to hide internal directories.