From d5e6421b03daf7eb1c94e14de4d1c8f9d959ba02 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 9 Apr 2023 13:58:46 -0400 Subject: [PATCH] Updated readme. --- Readme.md | 13 ++++++------- gencpp.code-workspace | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 gencpp.code-workspace diff --git a/Readme.md b/Readme.md index 56cb7e0..a4319d1 100644 --- a/Readme.md +++ b/Readme.md @@ -64,12 +64,12 @@ The user is given `Code` typed objects that are used to build up the AST. Example using each construction interface: -#### Upfrontl +#### Upfront ```cpp Code t_uw = def_type( name(uw) ); Code t_allocator = def_type( name(allocator) ); -Code t_string_cosnt = def_type( name(char), def_specifiers( 3, ESpecifier::Const, ESpeciifer::Ptr ) ); +Code t_string_cosnt = def_type( name(char), def_specifiers( 2, ESpecifier::Const, ESpecifier::Ptr ) ); Code header; { @@ -133,8 +133,7 @@ Code header = untyped_str( ``` `name` is a helper macro for providing a string literal with its size, intended for the name paraemter of functions. -`code` is a helper macro for providing a string literal with its size, but intended for a code string parameters. - +`code` is a helper macro for providing a string literal with its size, but intended for code string parameters. All three constrcuton interfaces will generate the following C code: @@ -151,7 +150,7 @@ struct ArrayHeader ## Gen's DSL -If you don't mind a low amount of macros (29 lines), a DSL may be optionally defined with: +If you don't mind a low amount of macros (61 sloc), a DSL may be optionally defined with: ```cpp GEN_DEFINE_DSL @@ -372,7 +371,7 @@ Interface : Usage: ```cpp -Code = parse_( string with code ); +Code = parse_( ); Code = def_( ..., parse_( @@ -539,7 +538,7 @@ However, if: * You enjoy actually *seeing* the generated code instead of just the error symbols or the pdb symbols. * You value your debugging expereince, and would like to debug your metaprogram, without having to step through the debug version of the compiler (if you even can) * Want to roll your own reflection system -* Want to maintain a series of libraries for internal use, but don't want to deal with manaual merging as often when they update. +* Want to maintain a series of libraries for internal use, but don't want to deal with manual merging as often when they update. * Want to create tailored headers for your code or for your libraries since you usually don't need the majority of the code within them. Then this might help you boostrap a toolset todo so. diff --git a/gencpp.code-workspace b/gencpp.code-workspace new file mode 100644 index 0000000..7f95ff0 --- /dev/null +++ b/gencpp.code-workspace @@ -0,0 +1,20 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "files.associations": { + "*.rmd": "markdown", + "array": "cpp", + "compare": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "xtr1common": "cpp", + "xutility": "cpp", + "initializer_list": "cpp", + "table.h": "c" + } + } +} \ No newline at end of file