about summary refs log tree commit diff
path: root/users/fcuny/exp/monkey/pkg
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-05-10 19:21:39 -0700
committerFranck Cuny <franck@fcuny.net>2021-05-10 19:21:39 -0700
commit8437218bdaed90cab7374a752f8aaf128225aa1a (patch)
tree41d1f2bc8a0877df9e7fd16e12845b77417c5a6a /users/fcuny/exp/monkey/pkg
parentgit: ignore binary for the REPL (diff)
downloadworld-8437218bdaed90cab7374a752f8aaf128225aa1a.tar.gz
lint: fix a few issues
Diffstat (limited to '')
-rw-r--r--users/fcuny/exp/monkey/pkg/lexer/lexer.go1
-rw-r--r--users/fcuny/exp/monkey/pkg/repl/repl.go3
-rw-r--r--users/fcuny/exp/monkey/pkg/token/token.go1
3 files changed, 4 insertions, 1 deletions
diff --git a/users/fcuny/exp/monkey/pkg/lexer/lexer.go b/users/fcuny/exp/monkey/pkg/lexer/lexer.go
index 06d526e..3e98cf0 100644
--- a/users/fcuny/exp/monkey/pkg/lexer/lexer.go
+++ b/users/fcuny/exp/monkey/pkg/lexer/lexer.go
@@ -1,3 +1,4 @@
+// Package lexer provides a lexer to the monkey language.
 package lexer
 
 import "monkey/pkg/token"
diff --git a/users/fcuny/exp/monkey/pkg/repl/repl.go b/users/fcuny/exp/monkey/pkg/repl/repl.go
index e8b3b1f..5e7b1d1 100644
--- a/users/fcuny/exp/monkey/pkg/repl/repl.go
+++ b/users/fcuny/exp/monkey/pkg/repl/repl.go
@@ -1,3 +1,4 @@
+// Package repl provides a REPL to the monkey language.
 package repl
 
 import (
@@ -13,7 +14,7 @@ const PROMPT = ">> "
 func Start(in io.Reader, out io.Writer) {
 	scanner := bufio.NewScanner(in)
 	for {
-		fmt.Printf(PROMPT)
+		fmt.Print(PROMPT)
 		scanned := scanner.Scan()
 
 		if !scanned {
diff --git a/users/fcuny/exp/monkey/pkg/token/token.go b/users/fcuny/exp/monkey/pkg/token/token.go
index b2342e7..5eadc5e 100644
--- a/users/fcuny/exp/monkey/pkg/token/token.go
+++ b/users/fcuny/exp/monkey/pkg/token/token.go
@@ -1,3 +1,4 @@
+// Package token provides a tokenizer for the monkey language.
 package token
 
 // TokenType represents the type of the token