mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-16 19:51:47 -07:00
Updated readme, added def_body and AST::validate_body
Fixed meson first setup error with missing thirdparty dir (removed it since its no longer used) Improved SOA test to use newly added funtions.
This commit is contained in:
@ -21,7 +21,7 @@ These build up a code AST to then serialize with a file builder.
|
||||
|
||||
## Notes
|
||||
|
||||
The project has reached a sort of *alpha* state, all the current functionality works however there is some kinks with the design to iterate on.
|
||||
The project has reached a sort of *alpha* state, all the current functionality works for the test cases but it will most likely break in many other cases.
|
||||
|
||||
The project has no external dependencies beyond:
|
||||
|
||||
@ -224,7 +224,7 @@ u8 _Align_Pad[3];
|
||||
*`CodeT` is a typedef for `ECode::Type` which has an underlying type of `u32`*
|
||||
*`OperatorT` is a typedef for `EOperator::Type` which has an underlying type of `u32`*
|
||||
*`StringCahced` is a typedef for `String const`, to denote it is an interned string*
|
||||
*`String` is the dynamically allocated string type for the library.
|
||||
*`String` is the dynamically allocated string type for the library*
|
||||
|
||||
AST widths are setup to be AST_POD_Size.
|
||||
The width dictates how much the static array can hold before it must give way to using an allocated array:
|
||||
@ -322,6 +322,8 @@ Bodies:
|
||||
* def_struct_body
|
||||
* def_union_body
|
||||
|
||||
* def_body
|
||||
|
||||
Usage:
|
||||
|
||||
```cpp
|
||||
@ -343,6 +345,9 @@ def_global_body( args( ht_entry, array_ht_entry, hashtable ));
|
||||
def_global_body( 3, ht_entry, array_ht_entry, hashtable );
|
||||
```
|
||||
|
||||
If a more incremental approach is desired for the body ASTs, `Code def_body( CodeT type )` can be used to create an empty body.
|
||||
When the members have been populated use: `AST::validate_body` to verify that the members are valid entires for that type.
|
||||
|
||||
### Parse construction
|
||||
|
||||
A string provided to the API is parsed for the intended language construct.
|
||||
|
Reference in New Issue
Block a user