about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--read.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/read.lua b/read.lua index f50fa40..a41816f 100644 --- a/read.lua +++ b/read.lua
@@ -141,15 +141,9 @@ function m.read (port)
141 if toktype == "close" then 141 if toktype == "close" then
142 return t.list(L) 142 return t.list(L)
143 elseif toktype == "dot" then 143 elseif toktype == "dot" then
144 local nxt, nxttype = port:next_token() 144 local fin = m.read(port)
145 if nxttype == "close" then 145 port:next_token() -- throw away ')'
146 error("Unexpected ')'") 146 return t.list(L, fin)
147 end
148 local fin, fintype = port:next_token()
149 if fintype ~= "close" then
150 error("Too many after dot")
151 end
152 return t.list(L, nxt)
153 else 147 else
154 table.insert(L, 148 table.insert(L,
155 read_ahead(tok, toktype)) 149 read_ahead(tok, toktype))