From 87b188bae2c8a2a9f81e872805d072be7ec910b2 Mon Sep 17 00:00:00 2001 From: Bobby Date: Fri, 8 Mar 2024 21:38:19 +0000 Subject: ast: fn init --- repl/repl.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'repl') diff --git a/repl/repl.go b/repl/repl.go index 59c56d6..afee75e 100644 --- a/repl/repl.go +++ b/repl/repl.go @@ -4,10 +4,10 @@ import ( "bufio" "fmt" "io" + "mana/evaluator" "mana/lexer" + "mana/object" "mana/parser" - "mana/evaluator" - "mana/object" ) // PROMPT is the prompt for the REPL. @@ -19,13 +19,13 @@ const MANA_START = ` ██║╚██╔╝██║██╔══██║██║╚████║██╔══██║ ██║░╚═╝░██║██║░░██║██║░╚███║██║░░██║ ╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═╝░░╚══╝╚═╝░░╚═╝ -` +` func Start(in io.Reader, out io.Writer) { var scanner *bufio.Scanner = bufio.NewScanner(in) - env := object.NewEnvironment() + env := object.NewEnvironment() - io.WriteString(out, MANA_START + "\n") + io.WriteString(out, MANA_START+"\n") for { fmt.Fprint(out, PROMPT) @@ -57,6 +57,6 @@ func Start(in io.Reader, out io.Writer) { func printParserErrors(out io.Writer, errors []string) { io.WriteString(out, "ParseError:\n") for _, msg := range errors { - io.WriteString(out, "\t" + msg + "\n") + io.WriteString(out, "\t"+msg+"\n") } } -- cgit v1.2.3