Documentation
¶
Overview ¶
Package repl implements TypeRB's project-aware interactive evaluator. Every accepted input is compiled through the normal project pipeline before its typed IR is evaluated.
Index ¶
- func Complete(source string) bool
- func DisplayType(typ types.Type) string
- func Inspect(value Value) string
- func Run(options Options) error
- type Compilation
- type CompileFunc
- type Evaluator
- func (e *Evaluator) Close() error
- func (e *Evaluator) Evaluate(statements []ir.Statement, module string) (Result, error)
- func (e *Evaluator) EvaluateContext(ctx context.Context, statements []ir.Statement, module string) (Result, error)
- func (e *Evaluator) LoadDefinitions(program *ir.Program)
- func (e *Evaluator) LoadProject(programs []*ir.Program, sessionModule string) error
- type Options
- type Result
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complete ¶
Complete reports whether source is a complete REPL submission. It uses the lossless lexer so keywords inside strings and comments do not affect nesting.
func DisplayType ¶ added in v0.4.0
DisplayType keeps an authored alias intact while restoring an owned nested declaration when lowering retained only its leaf spelling in a composite runtime type.
Types ¶
type Compilation ¶
type CompileFunc ¶
type CompileFunc func(source string) (*Compilation, error)
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
func (*Evaluator) EvaluateContext ¶
func (*Evaluator) LoadDefinitions ¶
Click to show internal directories.
Click to hide internal directories.