Hey guys, longtime listener, second-time caller.
In my spare time after work, I've been chipping away on making a HTML/CSS compiler to make doing any kind of frontend work for web less painful.
https://github.com/SilbinaryWolf/fel
The problem with this project is that I'm a web developer full-time (PHP/HTML/CSS/JS) and so I'm not super experienced with managing memory myself and I feel like I've abused the pool pattern for this project to a ridiculous degree, causing unnecessary code complexity.
I'm just wondering in a general sense where I can simplify things in a way that is both performant and easier to manage.
For example, I was considering switching my CSS_Rule/AST structs to use an overloaded 'new' keyword wherein they can just allocate from a pool of those types based on a global allocator pointer/var. (Also not sure how to go about making this thread-safe assuming I need/want threading in the future)
Then instead of storing the children in an array named 'childRules', I'd have an array of ints referencing what that AST/CSS_Rule's parent is. Then to iterate over an AST/CSS_Rule's children, you just iterate over the 'parent int array' and find whatever items match the ID of the AST you want the children of.
I'm putting up everything I've got so far so that people can give me their 2-cents on my style and structure as there may be C/C++ features that would simplify the readability that I'm not aware of.