repl

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package repl provides an interactive Read-Eval-Print Loop for Glyph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type REPL

type REPL struct {
	// contains filtered or unexported fields
}

REPL provides an interactive programming environment for Glyph.

func New

func New(reader io.Reader, writer io.Writer, version string) *REPL

New creates a new REPL instance.

func (*REPL) GetEnvironment

func (r *REPL) GetEnvironment() *interpreter.Environment

GetEnvironment returns the current REPL environment.

func (*REPL) GetInterpreter

func (r *REPL) GetInterpreter() *interpreter.Interpreter

GetInterpreter returns the REPL interpreter.

func (*REPL) LoadFile

func (r *REPL) LoadFile(filepath string) error

LoadFile loads and executes a Glyph file.

func (*REPL) Reset

func (r *REPL) Reset()

Reset resets the REPL state.

func (*REPL) Start

func (r *REPL) Start() error

Start begins the REPL loop.

func (*REPL) Stop

func (r *REPL) Stop()

Stop stops the REPL loop.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL