261
262
263
264
265
266
267
268
269
270
271
272
273
274
|
elseif c == start then
depth = depth + 1
elseif c == stop then
depth = depth - 1
if depth == 0 then
return s:sub(1+#start, p.byte - #stop), p.byte -- FIXME
elseif depth < 0 then
ss.str.exn('out of place %s', stop):throw()
end
end
end
ss.str.exn('[%s] expected before end of line', stop):throw()
end
|
|
261
262
263
264
265
266
267
268
269
270
271
272
273
274
|
elseif c == start then
depth = depth + 1
elseif c == stop then
depth = depth - 1
if depth == 0 then
return s:sub(1+#start, p.byte - #stop), p.byte -- FIXME
elseif depth < 0 then
ss.str.exn('out of place token ā%sā', stop):throw()
end
end
end
ss.str.exn('token ā%sā expected before end of line', stop):throw()
end
|