diff options
author | Itamar <itamar8910@gmail.com> | 2021-02-06 16:27:39 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-08 23:10:38 +0100 |
commit | 72fdab7bfb50505e23db0412be7c694c7b00eb66 (patch) | |
tree | 9ef09d164edd72208400f1b14eb1485bdf046315 /Base/home | |
parent | 02038a0edee0f01f76e90c8b4fbdf208592ea262 (diff) | |
download | serenity-72fdab7bfb50505e23db0412be7c694c7b00eb66.zip |
LanguageServers/Cpp: ParserAutoComplete engine inspects header files
... and performs preprocessing on the source code before parsing.
To support this, we are now able to keep track of multiple
files in the autocomplete engine. We re-parse a file whenever it is
edited.
Diffstat (limited to 'Base/home')
-rw-r--r-- | Base/home/anon/Source/little/other.cpp | 5 | ||||
-rw-r--r-- | Base/home/anon/Source/little/other.h | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/Base/home/anon/Source/little/other.cpp b/Base/home/anon/Source/little/other.cpp index 69d7173c9f..5ef3a12eb0 100644 --- a/Base/home/anon/Source/little/other.cpp +++ b/Base/home/anon/Source/little/other.cpp @@ -1,12 +1,13 @@ -#include <stdio.h> #include "other.h" +#include <stdio.h> int func() { int x = 1; int y = 2; + StructInHeader mystruct; printf("x: %d\n", x); printf("y: %d\n", y); - printf("x+y: %d\n", x+y); + printf("x+y: %d\n", x + y); return x + y; } diff --git a/Base/home/anon/Source/little/other.h b/Base/home/anon/Source/little/other.h index 45588fbf88..dbc0f47901 100644 --- a/Base/home/anon/Source/little/other.h +++ b/Base/home/anon/Source/little/other.h @@ -1 +1,12 @@ int func(); + +#define USE_VAR2 + +struct StructInHeader { + int var1; +#ifdef USE_VAR2 + int var2; +#else + int var3; +#endif +}; |