mirror of
				https://github.com/Ed94/gencpp.git
				synced 2025-10-31 06:50:53 -07:00 
			
		
		
		
	Proofing
This commit is contained in:
		| @@ -24,16 +24,16 @@ If using the library's provided build scripts: | ||||
|     * `<push/pop>.<name>.inline.<hpp>`: macros that are meant to be injected at specific locations of the library file/s. | ||||
|     * `misc.hpp`: Misc functionality used by the library generation metaprograms. | ||||
|     * `undef.macros.h`: Undefines all macros from library. | ||||
|   * **auxillary**: Non-essential tooling: | ||||
|   * **auxiliary**: Non-essential tooling: | ||||
|     * `Builder`: Similar conceptually to Jai programming language's *builder*, just opens a file and prepares a string buffer to serialize code into (`builder_print`, `builder_print_fmt`). Then write & close the file when completed (`builder_write`). | ||||
|     * **`Scanner`**: Interface to load up `Code` from files two basic funcctions are currently provided. | ||||
|     * **`Scanner`**: Interface to load up `Code` from files two basic functions are currently provided. | ||||
|       * `scan_file`: Used mainly by the library format generators to directly scan files into untyped `Code` (raw string content, pre-formatted no AST parsed). | ||||
|       * `parse_file`: Used to read file and then parsed to populate a `CodeBody` AST. | ||||
|       * CSV parsing via one or two columns simplified. | ||||
| * **gen_segemetned**: Dependencies go into gen.dep.{hpp/cpp} and components into gen.{hpp/cpp} | ||||
| * **gen_singleheader**: Everything into a single file: gen.hpp | ||||
| * **gen_unreal_engine**: Like gen_segemented but the library is modified slightly to compile as a thirdparty library within an Unreal Engine plugin or module. | ||||
| * **gen_c_library**: The library is heavily modifed into C11 compliant code. A segemented and single-header set of variants are generated. | ||||
| * **gen_unreal_engine**: Like gen_segmented but the library is modified slightly to compile as a thirdparty library within an Unreal Engine plugin or module. | ||||
| * **gen_c_library**: The library is heavily modifed into C11 compliant code. A segmented and single-header set of variants are generated. | ||||
|  | ||||
| Code not making up the core library is located in `auxiliary/<auxiliary_name>.<hpp/cpp>`. These are optional extensions or tools for the library. | ||||
|  | ||||
| @@ -108,7 +108,7 @@ Any large macros used implementing the gen interface or parser are going to be p | ||||
| The vast majority of macros should be single-line subsitutions that either add: | ||||
|  | ||||
| * Improvements to searching | ||||
| * Inteniality of keyword usage | ||||
| * Intentionality of keyword usage | ||||
| * A  feature that only the preprocessor has (ex: function name reflection or stringifying) | ||||
| * Compatibility of statements or expressions bewteen C & C++ that cannot be parsed by gencpp itself. | ||||
| * Masking highly verbose syntax (the latter is getting phased out). | ||||
| @@ -123,7 +123,7 @@ The vast majority of macros should be single-line subsitutions that either add: | ||||
|  | ||||
| There are ***five*** header files which are automatically generated using [base_codegen.hpp](./helpers/base_codegen.hpp) by [base.cpp](./base.cpp). They are all located in [components/gen](./components/gen/). | ||||
|  | ||||
| * [ecodetypes.hpp](./components/gen/ecode.hpp): `CodeType` enum definition and related implementaiton. Generation is based off of [ECodeType.csv](./enums/ECodeTypes.csv). | ||||
| * [ecodetypes.hpp](./components/gen/ecode.hpp): `CodeType` enum definition and related implementation. Generation is based off of [ECodeType.csv](./enums/ECodeTypes.csv). | ||||
| * [especifier.hpp](./components/gen/especifier.hpp): `Specifier` enum definition, etc. Generated using [ESpecifier.csv](./enums/ESpecifier.csv). | ||||
| * [eoperator.hpp](./components/gen/eoperator.hpp): `Operator` enum definition, etc. Generated using [EOperator.hpp](./enums/EOperator.csv). | ||||
| * [etoktype.cpp](./components/gen/etoktype.cpp): `TokType` enum defininition, etc. Used by the lexer and parser backend. Uses two csvs: | ||||
|   | ||||
| @@ -420,7 +420,7 @@ struct AST | ||||
| 		Code Next; | ||||
| 		Code Back; | ||||
| 	}; | ||||
| 	Token*            Token; // Reference to starting token, only avaialble if it was derived from parsing. | ||||
| 	Token*            Token; // Reference to starting token, only available if it was derived from parsing. | ||||
| 	Code              Parent; | ||||
| 	CodeType          Type; | ||||
| //	CodeFlag          CodeFlags; | ||||
|   | ||||
| @@ -402,7 +402,7 @@ bool null__check( char const* context, char const* code_id, Code code ) { | ||||
| #define null_check( context, code ) null__check( #context, #code, cast(Code, code) ) | ||||
|  | ||||
| /* | ||||
| The implementaiton of the upfront constructors involves doing three things: | ||||
| The implementation of the upfront constructors involves doing three things: | ||||
| * Validate the arguments given to construct the intended type of AST is valid. | ||||
| * Construct said AST type. | ||||
| * Lock the AST (set to readonly) and return the valid object. | ||||
|   | ||||
| @@ -4629,7 +4629,7 @@ CodeTypename parser_parse_type( bool from_template, bool* typedef_is_function ) | ||||
| 		// <Attributes> <Specifiers> <class, enum, struct, union> <Name> | ||||
| 	} | ||||
|  | ||||
| // Decltype draft implementaiton | ||||
| // Decltype draft implementation | ||||
| #if 0 | ||||
| else if ( currtok.Type == Tok_DeclType ) | ||||
| { | ||||
|   | ||||
| @@ -178,7 +178,7 @@ enum EMacroFlags : u16 | ||||
| 	//  ^^^ This a kludge because unreal has a macro that behaves as both a 'statement' and an attribute (UE_DEPRECATED, PRAGMA_ENABLE_DEPRECATION_WARNINGS, etc) | ||||
| 	// TODO(Ed): We can keep the MF_Allow_As_Attribute flag for macros, however, we need to add the ability of AST_Attributes to chain themselves. | ||||
| 	// Its thats already a thing in the standard language anyway | ||||
| 	// & it would allow UE_DEPRECATED, (UE_PROPERTY / UE_FUNCTION) to chain themselves as attributes of a resolved member function/varaible definition | ||||
| 	// & it would allow UE_DEPRECATED, (UE_PROPERTY / UE_FUNCTION) to chain themselves as attributes of a resolved member function/variable definition | ||||
| 	MF_Allow_As_Attribute  = bit(3), | ||||
|  | ||||
| 	// When a macro is encountered after attributs and specifiers while parsing a function, or variable: | ||||
|   | ||||
| @@ -37,8 +37,8 @@ GEN_NS_BEGIN | ||||
| #include "components/interface.parsing.cpp" | ||||
| #include "components/interface.untyped.cpp" | ||||
|  | ||||
| #include "auxillary/builder.cpp" | ||||
| #include "auxillary/scanner.cpp" | ||||
| #include "auxiliary/builder.cpp" | ||||
| #include "auxiliary/scanner.cpp" | ||||
|  | ||||
| GEN_NS_END | ||||
|  | ||||
|   | ||||
| @@ -33,8 +33,8 @@ GEN_NS_BEGIN | ||||
| #include "components/gen/ast_inlines.hpp" | ||||
| #include "components/header_end.hpp" | ||||
|  | ||||
| #include "auxillary/builder.hpp" | ||||
| #include "auxillary/scanner.hpp" | ||||
| #include "auxiliary/builder.hpp" | ||||
| #include "auxiliary/scanner.hpp" | ||||
|  | ||||
| GEN_NS_END | ||||
|  | ||||
|   | ||||
| @@ -7,9 +7,9 @@ | ||||
| #	include "gen.hpp" | ||||
| #	include "helpers/push_ignores.inline.hpp" | ||||
| #	include "helpers/helper.hpp" | ||||
| #	include "auxillary/builder.hpp" | ||||
| #	include "auxillary/builder.cpp" | ||||
| #	include "auxillary/scanner.hpp" | ||||
| #	include "auxiliary/builder.hpp" | ||||
| #	include "auxiliary/builder.cpp" | ||||
| #	include "auxiliary/scanner.hpp" | ||||
|  | ||||
| #include <stdlib.h> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user