repl

package
v0.0.0-...-bf9f4d5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package repl is for the read-eval-print-loop

Index

Constants

View Source
const (
	InitialPrompt = "-- Type 'exit' to close the repl.\n----------\n"
	Prompt        = ">> "
)

Prompt are the characters that are displayed for the REPL

View Source
const CatBug = "" +
	"CAN I HAS NO BUGZ PLEASE?!\n" +
	"       _                        \n" +
	"       \\`*-.                    \n" +
	"        )  _`-.                 \n" +
	"       .  : `. .                \n" +
	"       : _   '  \\               \n" +
	"       ; *` _.   `*-._          \n" +
	"       `-.-'          `-.       \n" +
	"         ;       `       `.     \n" +
	"         :.       .        \\    \n" +
	"         . \\  .   :   .-'   .   \n" +
	"         '  `+.;  ;  '      :   \n" +
	"         :  '  |    ;       ;-. \n" +
	"         ; '   : :`-:     _.`* ;\n" +
	"[bug] .*' /  .*' ; .*`- +'  `*' \n" +
	"      `*-*   `*-*  `*-*'\n"

CatBug is the "picture" displayed when an error has been detected by either the parse or the evaluator

Variables

This section is empty.

Functions

func PrintParserErrors

func PrintParserErrors(out io.Writer, errors []string)

PrintParserErrors simply prints the error returned by the parser and also prints the "picture" CatBug

func Start

func Start(in io.Reader, out io.Writer)

Start begin the repl loop

Types

This section is empty.

Jump to

Keyboard shortcuts

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