got intellisense working for the most part...

VScode works withs some issues.
VS2022 fails.
10xEditor works fine.
JetBrains Rider fails due to it not supporting <push/pop>_macro pragmas
This commit is contained in:
2023-08-21 23:02:20 -04:00
parent 7be3617083
commit db6e8b33eb
35 changed files with 55 additions and 52 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
// 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.
// This is done so that includes can be kept in dependency and component files so that intellisense works.
Code scan_file( char const* path, bool skip_header_includes = true )
Code scan_file( char const* path, bool skip_initial_directives = true )
{
FileInfo file;
@@ -24,7 +24,7 @@ Code scan_file( char const* path, bool skip_header_includes = true )
file_read( & file, str, fsize );
str.get_header().Length = fsize;
if ( skip_header_includes )
if ( skip_initial_directives )
{
#define current (*scanner)
StrC toks[] {
+8 -8
View File
@@ -20,18 +20,18 @@ constexpr char const* generation_notice =
"// This file was generated automatially by gen.bootstrap.cpp "
"(See: https://github.com/Ed94/gencpp)\n\n";
constexpr bool DontSkipIncludes = false;
constexpr bool DontSkipInitialDirectives = false;
int gen_main()
{
gen::init();
Code push_ignores = scan_file( "helpers/push_ignores.inline.hpp", DontSkipIncludes );
Code pop_ignores = scan_file( "helpers/pop_ignores.inline.hpp", DontSkipIncludes );
Code push_ignores = scan_file( "helpers/push_ignores.inline.hpp", DontSkipInitialDirectives );
Code pop_ignores = scan_file( "helpers/pop_ignores.inline.hpp", DontSkipInitialDirectives );
// gen_dep.hpp
{
Code header_start = scan_file( "dependencies/header_start.hpp", DontSkipIncludes );
Code header_start = scan_file( "dependencies/header_start.hpp", DontSkipInitialDirectives );
Code macros = scan_file( "dependencies/macros.hpp" );
Code basic_types = scan_file( "dependencies/basic_types.hpp" );
Code debug = scan_file( "dependencies/debug.hpp" );
@@ -192,7 +192,7 @@ int gen_main()
// gen_builder.hpp
{
Code builder = scan_file( "auxillary/builder.hpp" );
Code builder = scan_file( "auxillary/builder.hpp", DontSkipInitialDirectives );
Builder
header = Builder::open( "gen/gen.builder.hpp" );
@@ -207,7 +207,7 @@ int gen_main()
// gen_builder.cpp
{
Code builder = scan_file( "auxillary/builder.cpp" );
Code builder = scan_file( "auxillary/builder.cpp", DontSkipInitialDirectives );
Builder
src = Builder::open( "gen/gen.builder.cpp" );
@@ -222,7 +222,7 @@ int gen_main()
// gen_scanner.hpp
{
Code parsing = scan_file( "dependencies/parsing.hpp" );
Code scanner = scan_file( "auxillary/scanner.hpp" );
Code scanner = scan_file( "auxillary/scanner.hpp", DontSkipInitialDirectives );
Builder
header = Builder::open( "gen/gen.scanner.hpp" );
@@ -239,7 +239,7 @@ int gen_main()
// gen_scanner.cpp
{
Code parsing = scan_file( "dependencies/parsing.cpp" );
Code scanner = scan_file( "auxillary/scanner.cpp" );
Code scanner = scan_file( "auxillary/scanner.cpp", DontSkipInitialDirectives );
Builder
src = Builder::open( "gen/gen.scanner.cpp" );
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "static_data.cpp"
#include "static_data.cpp"
Code Code::Global;
Code Code::Invalid;
+4 -4
View File
@@ -1,8 +1,8 @@
#pragma once
// #include "types.hpp"
// #include "temp/ecode.hpp"
// #include "temp/eoperator.hpp"
// #include "temp/especifier.hpp"
#include "types.hpp"
#include "temp/ecode.hpp"
#include "temp/eoperator.hpp"
#include "temp/especifier.hpp"
struct AST;
struct AST_Body;
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "ast.hpp"
#include "ast.hpp"
#pragma region AST Types
/*
+2 -2
View File
@@ -1,6 +1,6 @@
#pragma once
// #include "inlines.hpp"
// #include "temp/ast_inlines.hpp"
#include "inlines.hpp"
#include "temp/ast_inlines.hpp"
#pragma region Constants
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "interface.hpp"
#include "interface.hpp"
void AST::append( AST* other )
{
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "ast.cpp"
#include "ast.cpp"
internal void init_parser();
internal void deinit_parser();
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "ast_types.hpp"
#include "ast_types.hpp"
#pragma region Gen Interface
+2 -2
View File
@@ -1,6 +1,6 @@
#pragma once
// #include "temp/etoktype.cpp"
// #include "interface.upfront.cpp"
#include "temp/etoktype.cpp"
#include "interface.upfront.cpp"
namespace Parser
{
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "interface.parsing.cpp"
#include "interface.parsing.cpp"
sw token_fmt_va( char* buf, uw buf_size, s32 num_tokens, va_list va )
{
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "interface.cpp"
#include "interface.cpp"
#pragma region Upfront
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "src_start.cpp"
#include "gen.hpp"
#pragma region StaticData
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "header_start.hpp"
#include "header_start.hpp"
using LogFailType = sw(*)(char const*, ...);
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "macros.hpp"
#include "macros.hpp"
#pragma region Basic Types
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "printing.hpp"
#include "printing.hpp"
#pragma region Containers
-1
View File
@@ -1,5 +1,4 @@
#pragma once
// #include "src_start.cpp"
#pragma region Debug
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "basic_types.hpp"
#include "basic_types.hpp"
#pragma region Debug
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "strings.cpp"
#include "strings.cpp"
#pragma region File Handling
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "strings.hpp"
#include "strings.hpp"
#pragma region File Handling
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "memory.cpp"
#include "memory.cpp"
#pragma region Hashing
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "containers.hpp"
#include "containers.hpp"
#pragma region Hashing
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "header_start.hpp"
#include "header_start.hpp"
#pragma region Macros
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "printing.cpp"
#include "printing.cpp"
#pragma region Memory
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "debug.hpp"
#include "debug.hpp"
#pragma region Memory
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "string_ops.cpp"
#include "string_ops.cpp"
#pragma region Printing
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "string_ops.hpp"
#include "string_ops.hpp"
#pragma region Printing
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "debug.cpp"
#include "debug.cpp"
#pragma region String Ops
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "memory.hpp"
#include "memory.hpp"
#pragma region String Ops
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "hashing.cpp"
#include "hashing.cpp"
#pragma region String
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "hashing.hpp"
#include "hashing.hpp"
#pragma region Strings
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "filesystem.cpp"
#include "filesystem.cpp"
#pragma region Timing
+1 -1
View File
@@ -1,5 +1,5 @@
#pragma once
// #include "filesystem.hpp"
#include "filesystem.hpp"
#pragma region Timing