Ed94 / gencpp

Staged metaprogramming in C++ for C/C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make filesystem and file operators optional

Ed94 opened this issue · comments

commented

The file operators (builder, scanner, and editor) are not necessary for ast creation or serialization.

If the user rather use their own file system but doesn't necessarily want to replace all dependencies of the project themselves there is a serious loc reduction from removing both the file operators and their associated dependencies from as an option when generating the library.

We can have it as an option in the build scripts to disable either via a arg pass while using it from cli or just directly changing the value in the script itself (Could also do it from an ini).

While the builder implementation is currently tiny, the filesystem dependencies for it are not. When the scanner and editor are implemented the loc will most likely increase by at least 3k.

This is from additions to the parser that will be necessary as we'll need to be able to derive full symbol names for identifiers used even in the execution block if its desired to support refactoring the name with the editor... (This may be overthinking, I could possibly just run a find and replace for a the identifier when entering the scope block if aware of what namespace the identifier belongs to ).

commented

Closing issue with : d36c3fa
File system dependencies cannot be made optional unfortunately, I made the file processors optional however.

I'm not sure as well if they'll continue to be "file processors". I'm thinking of keeping the builder and scanner simple, and instead just having the operations that may be performed on the AST itself instead of preemptively via requests through the scanning process.

The upside is with policy is possibly skipping nasty sections of the file that cannot be parsed...