mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-14 18:51:47 -07:00
correctionns to gen_unreal_engine
This commit is contained in:
@ -7,7 +7,9 @@
|
||||
#include "helpers/helper.hpp"
|
||||
|
||||
GEN_NS_BEGIN
|
||||
#include "helpers/push_container_defines.inline.hpp"
|
||||
#include "dependencies/parsing.cpp"
|
||||
#include "helpers/pop_container_defines.inline.hpp"
|
||||
GEN_NS_END
|
||||
|
||||
#include "auxillary/builder.hpp"
|
||||
@ -52,7 +54,7 @@ global bool generate_scanner = true;
|
||||
|
||||
void format_file( char const* path )
|
||||
{
|
||||
String resolved_path = String::make(GlobalAllocator, to_str(path));
|
||||
String resolved_path = String::make(GlobalAllocator, to_strc_from_c_str(path));
|
||||
|
||||
String style_arg = String::make(GlobalAllocator, txt("-style=file:"));
|
||||
style_arg.append("../scripts/.clang-format ");
|
||||
@ -99,7 +101,7 @@ int gen_main()
|
||||
|
||||
// gen_dep.hpp
|
||||
{
|
||||
CodeBody macros = def_body( CodeT::Global_Body );
|
||||
CodeBody macros = def_body( CT_Global_Body );
|
||||
{
|
||||
FileContents content = file_read_contents( GlobalAllocator, true, project_dir "dependencies/macros.hpp" );
|
||||
CodeBody ori_macros = parse_global_body( StrC { content.size, (char const*)content.data });
|
||||
@ -110,10 +112,9 @@ int gen_main()
|
||||
{
|
||||
switch (code->Type)
|
||||
{
|
||||
using namespace ECode;
|
||||
case Preprocess_Define:
|
||||
case CT_Preprocess_Define:
|
||||
{
|
||||
CodeDefine define = code.cast<CodeDefine>();
|
||||
CodeDefine define = cast(CodeDefine, code);
|
||||
if ( define->Name.starts_with(txt("global")) )
|
||||
{
|
||||
macros.append(parse_global_body(txt("#define global // Global variables")));
|
||||
|
25
gen_unreal_engine/unreal.refactor
Normal file
25
gen_unreal_engine/unreal.refactor
Normal file
@ -0,0 +1,25 @@
|
||||
__VERSION 1
|
||||
|
||||
// This is a example template to be used with the refactor program
|
||||
// Use it to refactor the naming convention of this library to your own.
|
||||
// Can be used as an aid to help use use your project's implementation if it fullfills the dependencies of this project.
|
||||
// Example: Most likely have a memory and string library already, just rename the functions and make sure the args are the same.
|
||||
// Program: https://github.com/Ed94/refactor
|
||||
|
||||
// NOTE: Due to the current limitations of the program, not every symbol in the library can be renamed.
|
||||
// This is due to the program not actually parsing C/C++.
|
||||
|
||||
// not : Ignore
|
||||
// include : #includes
|
||||
// word : Alphanumeric or underscore
|
||||
// namespace : Prefix search and replace (c-namspaces).
|
||||
// regex : Unavailable in __VERSION 1.
|
||||
|
||||
// Precedence (highest to lowest):
|
||||
// word, namespace, regex
|
||||
|
||||
// Gen Macro namespace
|
||||
// namespace GEN_, new_namespace_
|
||||
|
||||
word forceinline, FORCEINLINE
|
||||
word spec_forceinline, spec_FORCEINLINE
|
Reference in New Issue
Block a user