2023-04-22 19:24:55 -07:00
# Documentation
2023-07-24 20:10:10 -07:00
The core library is contained within `gen.hpp` and `gen.cpp` .
2023-07-19 20:42:28 -07:00
Things related to the editor and scanner are in their own respective files. (Ex: `gen.scanner.<hpp/cpp>` )
2023-07-24 10:44:19 -07:00
Dependencies are within `gen.dep.<hpp/cpp>`
2023-07-19 20:42:28 -07:00
2023-07-24 14:45:27 -07:00
The library is fragmented into a series of headers and sources files meant to be scanned in and then generated to a tailored format for the target
`gen` files.
2023-07-24 20:10:10 -07:00
Both libraries use *pre-generated* (self-hosting I guess) version of the library to then generate the latest version of itself.
2023-07-24 14:45:27 -07:00
(sort of a verification that the generated version is equivalent)
2023-07-24 20:10:10 -07:00
The default `gen.bootstrap.cpp` located in the project folder is meant to be produce a standard segmeneted library (WIP), where the components of the library
have relatively dedicated header and source files. With dependencies included at the top of the file and each header starting with a pragma once.
This will overwrite the existing library implementation in the immediate directory.
2023-07-24 14:45:27 -07:00
Use those to get a general idea of how to make your own tailored version.
If the naming convention is undesired, the `gencpp.refactor` script can be used with the [refactor]()
2023-04-22 19:24:55 -07:00
2023-07-13 12:00:05 -07:00
Feature Macros:
2023-04-22 19:24:55 -07:00
2023-07-24 10:44:19 -07:00
* `GEN_DONT_USE_NAMESPACE` : By default, the library is wrapped in a `gen` namespace, this will disable that expose it to the global scope.
2023-07-18 21:14:15 -07:00
* `GEN_DONT_ENFORCE_GEN_TIME_GUARD` : By default, the library ( gen.hpp/ gen.cpp ) expects the macro `GEN_TIME` to be defined, this disables that.
2023-07-15 20:38:53 -07:00
* `GEN_ROLL_OWN_DEPENDENCIES` : Optional override so that user may define the dependencies themselves.
2023-04-22 19:24:55 -07:00
* `GEN_DEFINE_LIBRARY_CORE_CONSTANTS` : Optional typename codes as they are non-standard to C/C++ and not necessary to library usage
2023-07-15 20:38:53 -07:00
* `GEN_ENFORCE_STRONG_CODE_TYPES` : Enforces casts to filtered code types.
2023-07-24 10:44:19 -07:00
* `GEN_EXPOSE_BACKEND` : Will expose symbols meant for internal use only.
* `GEN_Define_Attribute_Tokens` : Allows user to define their own attribute macros for use in parsing.
2023-04-22 19:24:55 -07:00
2023-07-19 20:42:28 -07:00
`GEN_USE_RECURSIVE_AST_DUPLICATION` is available but its not well tested and should not need to be used.
If constructing ASTs properly. There should be no modification of ASTs, and thus this would never become an issue.
2023-07-18 21:14:15 -07:00
(I will probably remove down the line...)