From 0197afd5434bf76704a9c526a29526e3ff71d424 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 28 Aug 2023 23:46:50 -0400 Subject: [PATCH] Changed how editor intellisense directives are handled for compoenents and dependencies Didn't like the way I was processing them in scan_file. --- .vscode/c_cpp_properties.json | 6 +- project/auxillary/scanner.hpp | 108 +++++++++++++++-------- project/bootstrap.cpp | 28 +++--- project/components/ast.cpp | 2 + project/components/ast.hpp | 2 + project/components/ast_types.hpp | 6 +- project/components/gen/ast_inlines.hpp | 3 + project/components/gen/ecode.hpp | 2 + project/components/gen/eoperator.hpp | 2 + project/components/gen/especifier.hpp | 2 + project/components/header_end.hpp | 2 + project/components/inlines.hpp | 2 + project/components/interface.cpp | 2 + project/components/interface.hpp | 2 + project/components/interface.parsing.cpp | 2 + project/components/interface.untyped.cpp | 2 + project/components/interface.upfront.cpp | 2 + project/components/static_data.cpp | 2 + project/components/types.hpp | 2 + project/dependencies/basic_types.hpp | 6 +- project/dependencies/containers.hpp | 6 +- project/dependencies/debug.cpp | 4 +- project/dependencies/debug.hpp | 6 +- project/dependencies/filesystem.cpp | 6 +- project/dependencies/filesystem.hpp | 6 +- project/dependencies/hashing.cpp | 6 +- project/dependencies/hashing.hpp | 2 + project/dependencies/macros.hpp | 6 +- project/dependencies/memory.cpp | 6 +- project/dependencies/memory.hpp | 6 +- project/dependencies/parsing.cpp | 4 +- project/dependencies/parsing.hpp | 4 +- project/dependencies/printing.cpp | 6 +- project/dependencies/printing.hpp | 6 +- project/dependencies/string_ops.cpp | 6 +- project/dependencies/string_ops.hpp | 6 +- project/dependencies/strings.cpp | 6 +- project/dependencies/strings.hpp | 6 +- project/dependencies/timing.cpp | 6 +- project/dependencies/timing.hpp | 6 +- 40 files changed, 202 insertions(+), 93 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index fd5dbf0..f2775d2 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -10,8 +10,9 @@ "UNICODE", "_UNICODE", "GEN_TIME", - "GEN_IMPLEMENTATION" + "GEN_IMPLEMENTATION", // "GEN_DONT_USE_NAMESPACE" + "GEN_INTELLISENSE_DIRECTIVES" ], "windowsSdkVersion": "10.0.19041.0", "compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe", @@ -28,8 +29,9 @@ "UNICODE", "_UNICODE", "GEN_TIME", - "GEN_IMPLEMENTATION" + "GEN_IMPLEMENTATION", // "GEN_DONT_USE_NAMESPACE" + "GEN_INTELLISENSE_DIRECTIVES" ], "windowsSdkVersion": "10.0.19041.0", "compilerPath": "C:/Users/Ed/scoop/apps/llvm/current/bin/clang++.exe", diff --git a/project/auxillary/scanner.hpp b/project/auxillary/scanner.hpp index ffb75e2..6bdffa8 100644 --- a/project/auxillary/scanner.hpp +++ b/project/auxillary/scanner.hpp @@ -1,10 +1,11 @@ + #pragma once #include "gen.hpp" // 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_initial_directives = true ) +Code scan_file( char const* path ) { FileInfo file; @@ -24,63 +25,92 @@ Code scan_file( char const* path, bool skip_initial_directives = true ) file_read( & file, str, fsize ); str.get_header().Length = fsize; - if ( skip_initial_directives ) + // Skip GEN_INTELLISENSE_DIRECTIVES preprocessor blocks + // Its designed so that the directive should be the first thing in the file. + // Anything that comes before it will also be omitted. { #define current (*scanner) - StrC toks[] { - txt( "pragma once" ), - txt( "include" ) - }; + #define matched 0 + #define move_fwd() do { ++ scanner; -- left; } while (0) + const StrC directive_start = txt( "ifdef" ); + const StrC directive_end = txt( "endif" ); + const StrC def_intellisense = txt("GEN_INTELLISENSE_DIRECTIVES" ); - char* scanner = str; - while ( current != '\r' && current != '\n' ) + bool found_directive = false; + char const* scanner = str.Data; + s32 left = fsize; + while ( left ) { - for ( StrC tok : toks ) + // Processing directive. + if ( current == '#' ) { - if ( current == '#' ) - { - ++ scanner; - } + move_fwd(); + while ( left && char_is_space( current ) ) + move_fwd(); - if ( strncmp( scanner, tok.Ptr, tok.Len ) == 0 ) + if ( ! found_directive ) { - scanner += tok.Len; - while ( scanner < ( str.Data + str.length() ) && current != '\r' && current != '\n' ) + if ( left && str_compare( scanner, directive_start.Ptr, directive_start.Len ) == matched ) { - ++ scanner; + scanner += directive_start.Len; + left -= directive_start.Len; + + while ( left && char_is_space( current ) ) + move_fwd(); + + if ( left && str_compare( scanner, def_intellisense.Ptr, def_intellisense.Len ) == matched ) + { + scanner += def_intellisense.Len; + left -= def_intellisense.Len; + + found_directive = true; + } } - // Skip the line - sptr skip_size = sptr( scanner - str.Data ); - if ( (scanner + 2) >= ( str.Data + str.length() ) ) + // Skip to end of line + while ( left && current != '\r' && current != '\n' ) + move_fwd(); + move_fwd(); + + if ( left && current == '\n' ) + move_fwd(); + + continue; + } + + if ( left && str_compare( scanner, directive_end.Ptr, directive_end.Len ) == matched ) + { + scanner += directive_end.Len; + left -= directive_end.Len; + + // Skip to end of line + while ( left && current != '\r' && current != '\n' ) + move_fwd(); + move_fwd(); + + if ( left && current == '\n' ) + move_fwd(); + + sptr skip_size = fsize - left; + if ( (scanner + 2) >= ( str.Data + fsize ) ) { - sptr new_length = sptr( str.get_header().Length ) - skip_size; - mem_move( str, scanner, new_length ); - str.get_header().Length = new_length; + mem_move( str, scanner, left ); + str.get_header().Length = left; break; } - if ( current == '\r' ) - { - skip_size += 2; - scanner += 2; - } - else - { - skip_size += 1; - scanner += 1; - } + mem_move( str, scanner, left ); + str.get_header().Length = left; - sptr new_length = sptr( str.get_header().Length ) - skip_size; - mem_move( str, scanner, new_length ); - str.get_header().Length = new_length; - - scanner = str; + break; } + } - ++ scanner; + move_fwd(); } + #undef move_fwd + #undef matched #undef current } diff --git a/project/bootstrap.cpp b/project/bootstrap.cpp index 2efad37..6e661ed 100644 --- a/project/bootstrap.cpp +++ b/project/bootstrap.cpp @@ -20,18 +20,16 @@ constexpr char const* generation_notice = "// This file was generated automatially by gencpp's bootstrap.cpp " "(See: https://github.com/Ed94/gencpp)\n\n"; -constexpr bool DontSkipInitialDirectives = false; - int gen_main() { gen::init(); - Code push_ignores = scan_file( "helpers/push_ignores.inline.hpp", DontSkipInitialDirectives ); - Code pop_ignores = scan_file( "helpers/pop_ignores.inline.hpp", DontSkipInitialDirectives ); + Code push_ignores = scan_file( "helpers/push_ignores.inline.hpp" ); + Code pop_ignores = scan_file( "helpers/pop_ignores.inline.hpp" ); // gen_dep.hpp { - Code header_start = scan_file( "dependencies/header_start.hpp", DontSkipInitialDirectives ); + Code header_start = scan_file( "dependencies/header_start.hpp" ); Code macros = scan_file( "dependencies/macros.hpp" ); Code basic_types = scan_file( "dependencies/basic_types.hpp" ); Code debug = scan_file( "dependencies/debug.hpp" ); @@ -147,31 +145,35 @@ int gen_main() header.print( pop_ignores ); header.write(); + CodeBody gen_component_header = def_global_body( args( + def_preprocess_cond( PreprocessCond_IfDef, txt("GEN_INTELLISENSE_DIRECTIVES") ), + pragma_once, + preprocess_endif, + fmt_newline, + untyped_str( to_str(generation_notice) ) + )); + Builder header_ecode = Builder::open( "components/gen/ecode.hpp" ); - header_ecode.print( pragma_once ); - header_ecode.print_fmt( generation_notice ); + header_ecode.print( gen_component_header ); header_ecode.print( ecode ); header_ecode.write(); Builder header_eoperator = Builder::open( "components/gen/eoperator.hpp" ); - header_eoperator.print( pragma_once ); - header_eoperator.print_fmt( generation_notice ); + header_eoperator.print( gen_component_header ); header_eoperator.print( eoperator ); header_eoperator.write(); Builder header_especifier = Builder::open( "components/gen/especifier.hpp" ); - header_especifier.print( pragma_once ); - header_especifier.print_fmt( generation_notice ); + header_especifier.print( gen_component_header ); header_especifier.print( especifier ); header_especifier.write(); Builder header_ast_inlines = Builder::open( "components/gen/ast_inlines.hpp" ); - header_ast_inlines.print( pragma_once ); - header_ast_inlines.print_fmt( generation_notice ); + header_ast_inlines.print( gen_component_header ); header_ast_inlines.print( ast_inlines ); header_ast_inlines.write(); } diff --git a/project/components/ast.cpp b/project/components/ast.cpp index fc0b8dc..804d3f3 100644 --- a/project/components/ast.cpp +++ b/project/components/ast.cpp @@ -1,5 +1,7 @@ +#if GEN_INTELLISENSE_DIRECTIVES #pragma once #include "static_data.cpp" +#endif Code Code::Global; Code Code::Invalid; diff --git a/project/components/ast.hpp b/project/components/ast.hpp index 308da4d..c920c76 100644 --- a/project/components/ast.hpp +++ b/project/components/ast.hpp @@ -1,8 +1,10 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "types.hpp" #include "gen/ecode.hpp" #include "gen/eoperator.hpp" #include "gen/especifier.hpp" +#endif namespace Parser { diff --git a/project/components/ast_types.hpp b/project/components/ast_types.hpp index 8ff257d..236aab9 100644 --- a/project/components/ast_types.hpp +++ b/project/components/ast_types.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "ast.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "ast.hpp" +#endif #pragma region AST Types /* diff --git a/project/components/gen/ast_inlines.hpp b/project/components/gen/ast_inlines.hpp index 7cb3fad..de72dbf 100644 --- a/project/components/gen/ast_inlines.hpp +++ b/project/components/gen/ast_inlines.hpp @@ -1,4 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once +#endif + // This file was generated automatially by gencpp's bootstrap.cpp (See: https://github.com/Ed94/gencpp) #pragma region generated code inline implementation diff --git a/project/components/gen/ecode.hpp b/project/components/gen/ecode.hpp index a2e61dc..ee46c90 100644 --- a/project/components/gen/ecode.hpp +++ b/project/components/gen/ecode.hpp @@ -1,4 +1,6 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once +#endif // This file was generated automatially by gencpp's bootstrap.cpp (See: https://github.com/Ed94/gencpp) diff --git a/project/components/gen/eoperator.hpp b/project/components/gen/eoperator.hpp index cea26b1..3feb117 100644 --- a/project/components/gen/eoperator.hpp +++ b/project/components/gen/eoperator.hpp @@ -1,4 +1,6 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once +#endif // This file was generated automatially by gencpp's bootstrap.cpp (See: https://github.com/Ed94/gencpp) diff --git a/project/components/gen/especifier.hpp b/project/components/gen/especifier.hpp index 4dedcf7..387d614 100644 --- a/project/components/gen/especifier.hpp +++ b/project/components/gen/especifier.hpp @@ -1,4 +1,6 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once +#endif // This file was generated automatially by gencpp's bootstrap.cpp (See: https://github.com/Ed94/gencpp) diff --git a/project/components/header_end.hpp b/project/components/header_end.hpp index b733045..efc2424 100644 --- a/project/components/header_end.hpp +++ b/project/components/header_end.hpp @@ -1,6 +1,8 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "inlines.hpp" #include "gen/ast_inlines.hpp" +#endif #pragma region Constants diff --git a/project/components/inlines.hpp b/project/components/inlines.hpp index 20aac3d..f1d53fd 100644 --- a/project/components/inlines.hpp +++ b/project/components/inlines.hpp @@ -1,5 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "interface.hpp" +#endif void AST::append( AST* other ) { diff --git a/project/components/interface.cpp b/project/components/interface.cpp index 707d47b..8050ca1 100644 --- a/project/components/interface.cpp +++ b/project/components/interface.cpp @@ -1,5 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "ast.cpp" +#endif internal void init_parser(); internal void deinit_parser(); diff --git a/project/components/interface.hpp b/project/components/interface.hpp index 91ecab9..d39eae5 100644 --- a/project/components/interface.hpp +++ b/project/components/interface.hpp @@ -1,5 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "ast_types.hpp" +#endif #pragma region Gen Interface diff --git a/project/components/interface.parsing.cpp b/project/components/interface.parsing.cpp index 7df12ca..87eba4b 100644 --- a/project/components/interface.parsing.cpp +++ b/project/components/interface.parsing.cpp @@ -1,6 +1,8 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "gen/etoktype.cpp" #include "interface.upfront.cpp" +#endif namespace Parser { diff --git a/project/components/interface.untyped.cpp b/project/components/interface.untyped.cpp index ceb65b2..01ce56b 100644 --- a/project/components/interface.untyped.cpp +++ b/project/components/interface.untyped.cpp @@ -1,5 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "interface.parsing.cpp" +#endif sw token_fmt_va( char* buf, uw buf_size, s32 num_tokens, va_list va ) { diff --git a/project/components/interface.upfront.cpp b/project/components/interface.upfront.cpp index af42b74..0fca812 100644 --- a/project/components/interface.upfront.cpp +++ b/project/components/interface.upfront.cpp @@ -1,5 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "interface.cpp" +#endif #pragma region Upfront diff --git a/project/components/static_data.cpp b/project/components/static_data.cpp index 9fd2495..c5e9eab 100644 --- a/project/components/static_data.cpp +++ b/project/components/static_data.cpp @@ -1,5 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "gen.hpp" +#endif #pragma region StaticData diff --git a/project/components/types.hpp b/project/components/types.hpp index 7f16a2f..bd8e760 100644 --- a/project/components/types.hpp +++ b/project/components/types.hpp @@ -1,5 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "header_start.hpp" +#endif using LogFailType = sw(*)(char const*, ...); diff --git a/project/dependencies/basic_types.hpp b/project/dependencies/basic_types.hpp index 6dc3693..415c607 100644 --- a/project/dependencies/basic_types.hpp +++ b/project/dependencies/basic_types.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "macros.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "macros.hpp" +#endif #pragma region Basic Types diff --git a/project/dependencies/containers.hpp b/project/dependencies/containers.hpp index 1c77aea..391df5e 100644 --- a/project/dependencies/containers.hpp +++ b/project/dependencies/containers.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "printing.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "printing.hpp" +#endif #pragma region Containers diff --git a/project/dependencies/debug.cpp b/project/dependencies/debug.cpp index 1b6705a..3b5adef 100644 --- a/project/dependencies/debug.cpp +++ b/project/dependencies/debug.cpp @@ -1,4 +1,6 @@ -#pragma once +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +#endif #pragma region Debug diff --git a/project/dependencies/debug.hpp b/project/dependencies/debug.hpp index 8e8fba1..43d50cb 100644 --- a/project/dependencies/debug.hpp +++ b/project/dependencies/debug.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "basic_types.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVESj +# pragma once +# include "basic_types.hpp" +#endif #pragma region Debug diff --git a/project/dependencies/filesystem.cpp b/project/dependencies/filesystem.cpp index 1861e9a..b78089a 100644 --- a/project/dependencies/filesystem.cpp +++ b/project/dependencies/filesystem.cpp @@ -1,5 +1,7 @@ -#pragma once -#include "strings.cpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "strings.cpp" +#endif #pragma region File Handling diff --git a/project/dependencies/filesystem.hpp b/project/dependencies/filesystem.hpp index 113f839..cec987e 100644 --- a/project/dependencies/filesystem.hpp +++ b/project/dependencies/filesystem.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "strings.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "strings.hpp" +#endif #pragma region File Handling diff --git a/project/dependencies/hashing.cpp b/project/dependencies/hashing.cpp index 2294810..caa46e9 100644 --- a/project/dependencies/hashing.cpp +++ b/project/dependencies/hashing.cpp @@ -1,5 +1,7 @@ -#pragma once -#include "memory.cpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "memory.cpp" +#endif #pragma region Hashing diff --git a/project/dependencies/hashing.hpp b/project/dependencies/hashing.hpp index 4b70f4a..a9d19e1 100644 --- a/project/dependencies/hashing.hpp +++ b/project/dependencies/hashing.hpp @@ -1,5 +1,7 @@ +#ifdef GEN_INTELLISENSE_DIRECTIVES #pragma once #include "containers.hpp" +#endif #pragma region Hashing diff --git a/project/dependencies/macros.hpp b/project/dependencies/macros.hpp index b28ec65..8125840 100644 --- a/project/dependencies/macros.hpp +++ b/project/dependencies/macros.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "header_start.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "header_start.hpp" +#endif #pragma region Macros diff --git a/project/dependencies/memory.cpp b/project/dependencies/memory.cpp index e9bdc53..60088e2 100644 --- a/project/dependencies/memory.cpp +++ b/project/dependencies/memory.cpp @@ -1,5 +1,7 @@ -#pragma once -#include "printing.cpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "printing.cpp" +#endif #pragma region Memory diff --git a/project/dependencies/memory.hpp b/project/dependencies/memory.hpp index f87b68a..d436885 100644 --- a/project/dependencies/memory.hpp +++ b/project/dependencies/memory.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "debug.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "debug.hpp" +#endif #pragma region Memory diff --git a/project/dependencies/parsing.cpp b/project/dependencies/parsing.cpp index d9d3d8e..f975f17 100644 --- a/project/dependencies/parsing.cpp +++ b/project/dependencies/parsing.cpp @@ -1,4 +1,6 @@ -#pragma once +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +#endif #pragma region ADT diff --git a/project/dependencies/parsing.hpp b/project/dependencies/parsing.hpp index d89bdac..05e4b73 100644 --- a/project/dependencies/parsing.hpp +++ b/project/dependencies/parsing.hpp @@ -1,4 +1,6 @@ -#pragma once +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +#endif #pragma region ADT diff --git a/project/dependencies/printing.cpp b/project/dependencies/printing.cpp index d8342ff..f3fef3d 100644 --- a/project/dependencies/printing.cpp +++ b/project/dependencies/printing.cpp @@ -1,5 +1,7 @@ -#pragma once -#include "string_ops.cpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "string_ops.cpp" +#endif #pragma region Printing diff --git a/project/dependencies/printing.hpp b/project/dependencies/printing.hpp index 8c7b895..a4e3d57 100644 --- a/project/dependencies/printing.hpp +++ b/project/dependencies/printing.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "string_ops.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "string_ops.hpp" +#endif #pragma region Printing diff --git a/project/dependencies/string_ops.cpp b/project/dependencies/string_ops.cpp index 4fb578d..28729da 100644 --- a/project/dependencies/string_ops.cpp +++ b/project/dependencies/string_ops.cpp @@ -1,5 +1,7 @@ -#pragma once -#include "debug.cpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "debug.cpp" +#endif #pragma region String Ops diff --git a/project/dependencies/string_ops.hpp b/project/dependencies/string_ops.hpp index 7bb61d3..8963fcd 100644 --- a/project/dependencies/string_ops.hpp +++ b/project/dependencies/string_ops.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "memory.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "memory.hpp" +#endif #pragma region String Ops diff --git a/project/dependencies/strings.cpp b/project/dependencies/strings.cpp index 7b323f0..86b6247 100644 --- a/project/dependencies/strings.cpp +++ b/project/dependencies/strings.cpp @@ -1,5 +1,7 @@ -#pragma once -#include "hashing.cpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "hashing.cpp" +#endif #pragma region String diff --git a/project/dependencies/strings.hpp b/project/dependencies/strings.hpp index 5fc28f0..b834575 100644 --- a/project/dependencies/strings.hpp +++ b/project/dependencies/strings.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "hashing.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "hashing.hpp" +#endif #pragma region Strings diff --git a/project/dependencies/timing.cpp b/project/dependencies/timing.cpp index 1062b0b..763e60f 100644 --- a/project/dependencies/timing.cpp +++ b/project/dependencies/timing.cpp @@ -1,5 +1,7 @@ -#pragma once -#include "filesystem.cpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "filesystem.cpp" +#endif #pragma region Timing diff --git a/project/dependencies/timing.hpp b/project/dependencies/timing.hpp index 30390c7..e4b9575 100644 --- a/project/dependencies/timing.hpp +++ b/project/dependencies/timing.hpp @@ -1,5 +1,7 @@ -#pragma once -#include "filesystem.hpp" +#ifdef GEN_INTELLISENSE_DIRECTIVES +# pragma once +# include "filesystem.hpp" +#endif #pragma region Timing