utils

package
v0.0.0-...-2e68688 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoCli

func DoCli(p PluginBase)

Types

type Config

type Config struct {
	Code                        string
	Quiet                       bool
	Exp                         string
	Ps1, Ps2                    string
	Args                        []string
	Interactive, OurInteractive bool
}

func ParseFlags

func ParseFlags() *Config

type Language

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

func (Language) Eval

func (lang Language) Eval(code string)

func (Language) EvalAndTryToPrint

func (lang Language) EvalAndTryToPrint(code string)

func (Language) EvalFile

func (lang Language) EvalFile(file string, args []string) int

func (Language) InternalREPL

func (lang Language) InternalREPL()

func (Language) REPL

func (lang Language) REPL()

func (Language) REPLLikeEval

func (lang Language) REPLLikeEval(code string)

func (Language) SetPrompts

func (lang Language) SetPrompts(ps1, ps2 string)

func (Language) Version

func (lang Language) Version() string

type PluginBase

type PluginBase interface {
	Open()
	Close()
	Version() string
}

type PluginEval

type PluginEval interface {
	PluginBase
	Eval(code string)
}

type PluginEvalExpression

type PluginEvalExpression interface {
	PluginBase
	EvalExpression(code string) string
}

type PluginEvalFile

type PluginEvalFile interface {
	PluginBase
	EvalFile(file string, args []string) int
}

type PluginREPL

type PluginREPL interface {
	PluginBase
	REPL()
}

type PluginREPLLikeEval

type PluginREPLLikeEval interface {
	PluginBase
	REPLLikeEval(code string)
}

type PluginSetPrompts

type PluginSetPrompts interface {
	PluginBase
	SetPrompts(ps1, ps2 string)
}

Jump to

Keyboard shortcuts

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