Skip to content

Commit

Permalink
improve prompt
Browse files Browse the repository at this point in the history
Signed-off-by: Flipez <code@brauser.io>
  • Loading branch information
Flipez committed Sep 28, 2021
1 parent 1f6a044 commit 9d315be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
package main

import (
"fmt"
"os"
"os/user"

"github.com/flipez/rocket-lang/repl"
)

func main() {
user, err := user.Current()
if err != nil {
panic(err)
}
fmt.Printf("Hello %s! This is the Monkey programming language!\n", user.Username)
fmt.Printf("Feel free to type in commands\n")
repl.Start(os.Stdin, os.Stdout)
}
4 changes: 2 additions & 2 deletions repl/repl.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
const PROMPT = ">> "

var buildVersion = "v0.9.0"
var buildDate = "2021-09-27"
var buildDate = "2021-09-27T21:13:44Z"

func Start(in io.Reader, out io.Writer) {
io.WriteString(out, fmt.Sprintf(ROCKET, buildVersion, buildDate))
Expand Down Expand Up @@ -53,7 +53,7 @@ const ROCKET = `
( ) | _ \___ __| |_____| |_| | __ _ _ _ __ _
/|/\|\ | / _ \/ _| / / -_) _| |__/ _ | ' \/ _ |
/_||||_\ |_|_\___/\__|_\_\___|\__|____\__,_|_||_\__, |
%10s | %-15s |___/
%10s | %-15s |___/
`

func printParserErrors(out io.Writer, errors []string) {
Expand Down

0 comments on commit 9d315be

Please sign in to comment.