Extremely barebones tool to automate importing files for large VBA codebases. Obviously aping the C preprocessor. Mostly just a quick and dirty proof of concept.
Two directives are supported: addincldir and include. Both must be
followed by a doublequote-enclosed path. The first one adds the path to the list
of include directories, the second one includes (imports) a file matching the
specified path from the first include directory where it's found. Directives
must be in a comment. Anything VBA's Trim() function would remove is
acceptable both before the start of the comment, and after the start of the
comment but before the "#". Only one directive will be processed in a given
line.
Modules whose name already exists in the VBProject we're working from will be
skipped. You can think of this as a #pragma once-like behavior.
Processing always starts with a module named "project". Any modules loaded when processing the "project" module will then be processed recursively. Modules that are already loaded when processing starts will be ignored.
The preprocessor proper is licensed under the terms of the GPLv3. Because I copied some code from one of my BSD-3-Clause-licensed libraries (marked in the source code as such); the whole file (preprocessor.bas) falls under the terms of both the BSD 3 Clause license, and the GPLv3. Both licenses can be found in the "licenses" directory.