libucl
libucl copied to clipboard
Ability to request line/col object?
This is just a feature request. It would be really great for validation reasons if we could extract the line/col for objects. Thoughts?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
It is not complicated to the parser to save this data. However, currently ucl_object_t
is optimized for the cache line size and is exactly 64 bytes. Adding new fields is rather painful, but maybe I could use thrash_stack for these purposes...
Yeah I figured that would cause friction. So I'm not sure.
I realize too that storing that much data for all objects on large configs might be painful, so maybe a parser flag as well to flag it on/off. But if it could be done, it would be very nice.
+1 to this. When emitting config errors, it if very helpful to be able to point to the file and line number where the error came from, especially when using 'include' to parse multiple files.