about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2024-04-16 22:28:38 -0500
committerCase Duckworth2024-04-16 22:28:38 -0500
commit827faa123796987bf2d36cc36cde60595416361c (patch)
treee252bfe8eabc8e6ba676a8a23774759d5383511b
parentChange names and hoist eval (diff)
downloadlam-827faa123796987bf2d36cc36cde60595416361c.tar.gz
lam-827faa123796987bf2d36cc36cde60595416361c.zip
Don't error on empty input
-rw-r--r--type.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/type.lua b/type.lua index baf9a67..e4fccc9 100644 --- a/type.lua +++ b/type.lua
@@ -88,6 +88,7 @@ local function input_port_next_token (port, readtable)
88 88
89 local token, token_type 89 local token, token_type
90 local c = port.buffer[1] 90 local c = port.buffer[1]
91 if not c then return nil end
91 if readtable.chars[c] then 92 if readtable.chars[c] then
92 token, token_type, port.buffer = 93 token, token_type, port.buffer =
93 readtable.chars[c](port.buffer) 94 readtable.chars[c](port.buffer)