Fixes for auxilary code + typo fix in ast.cpp

Needed the intellisense directive ifdef wrap.
This commit is contained in:
Edward R. Gonzalez 2023-08-29 00:03:08 -04:00
parent a4d9a63d71
commit c4c308c8ba
5 changed files with 12 additions and 74 deletions

View File

@ -1,4 +1,6 @@
#include "builder.hpp" #ifdef GEN_INTELLISENSE_DIRECTIVES
# include "builder.hpp"
#endif
Builder Builder::open( char const* path ) Builder Builder::open( char const* path )
{ {

View File

@ -1,5 +1,7 @@
#pragma once #ifdef GEN_INTELLISENSE_DIRECTIVES
#include "gen.hpp" # pragma once
# include "gen.hpp"
#endif
struct Builder struct Builder
{ {

View File

@ -1,67 +0,0 @@
#pragma once
#include "gen.scanner.hpp"
struct Policy
{
// Nothing for now.
};
enum class SymbolType : u32
{
Code,
Line,
Marker
};
struct Editor
{
enum RequestType : u32
{
Add,
Replace,
Remove
};
struct SymbolData
{
Policy Policy;
SymbolInfo Info;
};
struct RequestEntry
{
union {
SymbolData Symbol;
String Specification;
};
RequestType Type;
};
struct Receipt
{
StringCached File;
Code Found;
Code Written;
bool Result;
};
static AllocatorInfo Allocator;
static void set_allocator( AllocatorInfo allocator );
Array<FileInfo> Files;
String Buffer;
Array<RequestEntry> Requests;
void add_files( s32 num, char const** files );
void add ( SymbolInfo definition, Policy policy, Code to_inject );
void remove ( SymbolInfo definition, Policy policy );
void replace( SymbolInfo definition, Policy policy, Code to_replace);
# ifdef GEN_FEATURE_EDITOR_REFACTOR
void refactor( char const* file_path, char const* specification_path );
# endif
bool process_requests( Array<Receipt> out_receipts );
};

View File

@ -1,6 +1,7 @@
#ifdef GEN_INTELLISENSE_DIRECTIVES
#pragma once # pragma once
#include "gen.hpp" # include "gen.hpp"
#endif
// This is a simple file reader that reads the entire file into memory. // This is a simple file reader that reads the entire file into memory.
// It has an extra option to skip the first few lines for undesired includes. // It has an extra option to skip the first few lines for undesired includes.

View File

@ -1,4 +1,4 @@
#if GEN_INTELLISENSE_DIRECTIVES #ifdef GEN_INTELLISENSE_DIRECTIVES
#pragma once #pragma once
#include "static_data.cpp" #include "static_data.cpp"
#endif #endif