diff --git a/read/read.go b/read/read.go index 07a4500..a8add64 100644 --- a/read/read.go +++ b/read/read.go @@ -1,6 +1,7 @@ package read import ( + "fmt" "mal-go/hash_map" "mal-go/symbol" "mal-go/vector" @@ -47,6 +48,8 @@ func readForm(s string, pos int, ns string) (any, any, int) { res, err, pos = readVector(s, pos, ns) case '(': res, err, pos = readList(s, pos, ns) + default: + return nil, "unexpected char: '" + fmt.Sprint(c) + "'", pos } } return res, err, pos