Closed ThePhD closed 9 years ago
I've thought about this before but it didn't seem feasible to do. I could re-consider the issue but I don't think much has changed to make this feasible.
Shit-tier iterator version. I would say this could be made easier but shitty C++ for loops can't handle multiple different types, and there's no "single iterator" type, so. Screw iterators.
libjansson offers a c-style "any" iterator where you can fix values from the type like so. A similar API (that's less wonky since we're in C++) could probably be created and allowed for with table's
begin()
andend()
syntax, usingsol::object
for values and perhaps a newsol::key
type (since keys can only be integers or strings inlua
).I'd be interested in doing this for version 2.0 later on!