diff options
author | Case Duckworth | 2024-04-16 22:28:38 -0500 |
---|---|---|
committer | Case Duckworth | 2024-04-16 22:28:38 -0500 |
commit | 827faa123796987bf2d36cc36cde60595416361c (patch) | |
tree | e252bfe8eabc8e6ba676a8a23774759d5383511b | |
parent | Change names and hoist eval (diff) | |
download | lam-827faa123796987bf2d36cc36cde60595416361c.tar.gz lam-827faa123796987bf2d36cc36cde60595416361c.zip |
Don't error on empty input
-rw-r--r-- | type.lua | 1 |
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) |