ini icon indicating copy to clipboard operation
ini copied to clipboard

Rewrite tokenizer and parse mechanism for structs to allow for values in base of structure.

Open roarkanize opened this issue 5 years ago • 0 comments

This would mean rewriting completely the structure of the tokenizer to make it stateful by default, by adding a Tokenizer class which handles data management, etc. This class would have two main methods: tokenizeAlloc: which would use an allocator common to the structure to handle buffers and such, and tokenizeStatic: which would be used in comptime contexts, and would require to pass buffers from outside to keep valuable state. This would also require to split the parse function into a runtime and comptime version, since the tokenizer wouldn't be context agnostic. Whether this change is better or not will be seen when I get to write it.

There's also a need to rewrite the parsing functions to allow for values in the base of the structure, now they error with Invalid archetype at compile-time.

roarkanize avatar Aug 14 '20 17:08 roarkanize