mirror of
https://github.com/Ed94/gencpp.git
synced 2025-07-15 18:08:59 -07:00
Setup testing and library for getting the parse api done.
This commit is contained in:
@ -8,18 +8,18 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifdef gen_time
|
||||
|
||||
#include "Bloat.hpp"
|
||||
|
||||
// Temporarily here for debugging purposes.
|
||||
#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
|
||||
// #define GEN_DONT_USE_FATAL
|
||||
|
||||
// #define GEN_FEATURE_PARSING
|
||||
#define GEN_FEATURE_PARSING
|
||||
// #define GEN_FEATURE_EDITOR
|
||||
// #define GEN_FEATURE_SCANNER
|
||||
|
||||
|
||||
#ifdef gen_time
|
||||
namespace gen
|
||||
{
|
||||
using LogFailType = sw(*)(char const*, ...);
|
||||
@ -583,11 +583,6 @@ namespace gen
|
||||
|
||||
/*
|
||||
AST* typedef as to not constantly have to add the '*' as this is written often..
|
||||
|
||||
If GEN_ENFORCE_READONLY_AST is defined, readonly assertions will be done on any member dreference,
|
||||
and the 'gen API' related functions. will set their created ASTs to readonly before returning.
|
||||
|
||||
Casting to AST* will bypass.
|
||||
*/
|
||||
struct Code
|
||||
{
|
||||
@ -615,14 +610,6 @@ namespace gen
|
||||
return Invalid;
|
||||
}
|
||||
|
||||
#ifdef GEN_ENFORCE_READONLY_AST
|
||||
if ( ast->Readonly )
|
||||
{
|
||||
log_failure("Attempted to a body AST from a readonly AST!");
|
||||
return Invalid;
|
||||
}
|
||||
#endif
|
||||
|
||||
return * (Code*)( ast->body() );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user