diff options
-rw-r--r-- | read.lua | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
146 | token, chars = consume_symbol(chars) | 146 | token, chars = consume_symbol(chars) |
147 | return token, "symbol" | 147 | return token, "symbol" |
148 | end | 148 | end |
149 | if #chars == 0 then return nil end | ||
149 | end | 150 | end |
150 | end | 151 | end |
151 | end | 152 | end |
@@ -173,6 +174,7 @@ read.readmacros = { | |||
173 | else | 174 | else |
174 | table.insert(L, nt) | 175 | table.insert(L, nt) |
175 | end | 176 | end |
177 | assert(tokens[1], "Unexpected EOF") | ||
176 | end | 178 | end |
177 | pop(tokens) -- remove final ")" | 179 | pop(tokens) -- remove final ")" |
178 | return type.List(L, lt) | 180 | return type.List(L, lt) |