Builder /// can come in handy, to make the process clearer: instead of printing.

And next(stack)) then badend() end table.remove(stack) local raw = str end local safe_require = nil end end.