From 9bb37432195dcb3d69bc306b76bce61949e1be71 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 20 Mar 2024 22:53:33 -0500 Subject: Correct bugs with whitespace and spurious opening parens --- read.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/read.lua b/read.lua index 064be61..c3f3f64 100644 --- a/read.lua +++ b/read.lua @@ -146,6 +146,7 @@ function read.scan (chars) token, chars = consume_symbol(chars) return token, "symbol" end + if #chars == 0 then return nil end end end end @@ -173,6 +174,7 @@ read.readmacros = { else table.insert(L, nt) end + assert(tokens[1], "Unexpected EOF") end pop(tokens) -- remove final ")" return type.List(L, lt) -- cgit 1.4.1-21-gabe81