summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/LanguageServers
AgeCommit message (Collapse)Author
2023-02-13LibCore: Remove `Stream.h`Tim Schumacher
2023-02-13LibCore: Move Stream-based file into the `Core` namespaceTim Schumacher
2023-02-13LibCore: Move Stream-based sockets into the `Core` namespaceTim Schumacher
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-01-02Everywhere: Move AK/Debug.h include to using files or removeBen Wiederhake
2022-12-20HackStudio: Port to `Core::Stream::File` :^)Karol Kosek
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-11-01Everywhere: Explicitly link all binaries against the LibC targetTim Schumacher
Even though the toolchain implicitly links against -lc, it does not know where it should get LibC from except for the sysroot. In the case of Clang this causes it to pick up the LibC stub instead, which might be slightly outdated and feature missing symbols. This is currently not an issue that manifests because we pass through the dependency on LibC and other libraries by accident, which causes CMake to link against the LibC target (instead of just the library), and thus points the linker at the build output directory. Since we are looking to fix that in the upcoming commits, let's make sure that everything will still be able to find the proper LibC first.
2022-07-03Everywhere: Fix two inconsistent serenity_lib() output namesLinus Groh
- No underscores between word boundaries, i.e. `languageserver` and not `language_server` for LibLanguageServer - All lowercase, i.e. `coredump` and not `Coredump` for LibCoredump
2022-05-21LibCodeComprehension: Re-organize code comprehension related codeItamar
This moves all code comprehension-related code to a new library, LibCodeComprehension. This also moves some types related to code comprehension tasks (such as autocomplete, find declaration) out of LibGUI and into LibCodeComprehension.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-31LanguageServers/Cpp: Add SemanticType::PreprocessorMacroItamar
This adds a new semantic token type, PreprocessorMacro. Calls to preprocessor macros will now be highlighted when semantic highlighting is enabled in Hack Studio.
2022-03-31LibGUI: Add AutocompleteProvider::TokenInfo::type_to_string()Itamar
2022-03-20Everywhere: Move cpp-tests under /home/anon/TestsBrian Gianforcaro
2022-02-27LanguageServers/Cpp: Make find declaration of enums workItamar
2022-02-27LanguageServers/Cpp: Make find declaration for a declaration node workItamar
The CppComprehensionEngine can now find the declaration of a declaration node of type class/namespace/function.
2022-02-27LanguageServers/Cpp: Make go to declaration of a namespace workItamar
The CppComprehensionEngine can now find the declaration of a reference to a namespace.
2022-02-25Userland: Rename IPC ClientConnection => ConnectionFromClientItamar
This was done with CLion's automatic rename feature and with: find . -name ClientConnection.h | rename 's/ClientConnection\.h/ConnectionFromClient.h/' find . -name ClientConnection.cpp | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
2022-02-23LanguageServers/Cpp: Fix "complete_includes" language server testItamar
Previously the target result was only a partial completion.
2022-02-23LibCpp: Allow qualified names in AST Declaration nodesItamar
Previously, the names of declarations where stored as a simple StringView. Because of that, we couldn't parse out-of-line function definitions, which have qualified names. For example, we couldn't parse the following snippet: ``` void MyClass::foo(){} ``` To fix this, we now store the name of a declaration with a ASTNode::Name node, which represents a qualified named.
2022-02-16DevTools: Use default constructors/destructorsLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-02-09HackStudio: Add tokens_info_result() and tokens_info_result() IPC callsItamar
These IPC calls are used in the communication with the language server to fetch semantic information about the tokens in a code document.
2022-02-09LanguageServers/Cpp: Make find_declaration_of() more flexibleItamar
Previously, find_declaration_of() only worked for AST nodes of type Identifier. It now also works for declaration node, member variables and function parameters.
2022-02-09LibCpp: Update regressions tests resultsItamar
The LibCpp regression tests results have to be updated after tweaking the token end position calculation logic of some token types.
2022-01-15LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServersin-ack
This change unfortunately cannot be atomically made without a single commit changing everything. Most of the important changes are in LibIPC/Connection.cpp, LibIPC/ServerConnection.cpp and LibCore/LocalServer.cpp. The notable changes are: - IPCCompiler now generates the decode and decode_message functions such that they take a Core::Stream::LocalSocket instead of the socket fd. - IPC::Decoder now uses the receive_fd method of LocalSocket instead of doing system calls directly on the fd. - IPC::ConnectionBase and related classes now use the Stream API functions. - IPC::ServerConnection no longer constructs the socket itself; instead, a convenience macro, IPC_CLIENT_CONNECTION, is used in place of C_OBJECT and will generate a static try_create factory function for the ServerConnection subclass. The subclass is now responsible for passing the socket constructed in this function to its ServerConnection base; the socket is passed as the first argument to the constructor (as a NonnullOwnPtr<Core::Stream::LocalServer>) before any other arguments. - The functionality regarding taking over sockets from SystemServer has been moved to LibIPC/SystemServerTakeover.cpp. The Core::LocalSocket implementation of this functionality hasn't been deleted due to my intention of removing this class in the near future and to reduce noise on this (already quite noisy) PR.
2022-01-01HackStudio: Avoid unnecessary copies in CodeComprehensionEngineBen Wiederhake
2021-12-06LibIPC: Add IPC::take_over_accepted_client_from_system_server<Client>()Andreas Kling
This is an encapsulation of the common work done by all of our single-client IPC servers on startup: 1. Create a Core::LocalSocket, taking over an accepted fd. 2. Create an application-specific ClientConnection object, wrapping the socket. It's not a huge change in terms of lines saved, but I do feel that it improves expressiveness. :^)
2021-12-05Userland: Cast unused BackgroundAction::construct() results to voidSam Atkins
User code does not need to keep this alive, so casting to void is safe. But maybe a bit weird.
2021-12-03LibCpp: Add "ignore invalid statements" option to PreprocessorItamar
When we run the Preprocessor from the CppComprehensionEngine of the language server, we don't want the preprocessor to crash if it encounters an invalid preprocessor statement (for example, an #endif statement without an accompanying previous #if statement). To achieve this, this commit adds an "ignore_invalid_statements" flag to the preprocessor which is set by the CppComprehensionEngine. Fixes #11064.
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-23LibCore: Make LocalSocket takeover mechanism return ErrorOr<T>Andreas Kling
2021-11-23LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCoreAndreas Kling
With this change, System::foo() becomes Core::System::foo(). Since LibCore builds on other systems than SerenityOS, we now have to make sure that wrappers work with just a standard C library underneath.
2021-11-23LanguageServers/Shell: Port to LibMain :^)Andreas Kling
2021-11-23LanguageServers/Cpp: Port to LibMain :^)Andreas Kling
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-11-02Demos+DevTools+Games: Fix visibility of Object-derivative constructorsBen Wiederhake
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
2021-11-02HackStudio: Don't close autocomplete after applying #include directoriesthislooksfun
2021-11-02HackStudio: Append a / when completing a directorythislooksfun
2021-11-02HackStudio: Correctly handle nested pathsthislooksfun
Previously the paths were concatinated incorrectly, so triggering the autocomplete on `#include "foo/bar"` would never work. Now it does. :^)
2021-11-02HackStudio: Handle autocomplete inside #include's <> and ""thislooksfun
2021-11-02LibGUI: Remove GUI::AutocompleteProvider::Entry::kindthislooksfun
The only code using it was removed in the previous commit.
2021-11-02HackStudio+LibGUI: Handle #include quotes and brackets in the enginethislooksfun
Previously we had a special case in order to auto-append quotes or angle brackets to #include statements. After the previous commit this is no longer necessary.
2021-10-01Userland: Fix typosNico Weber
2021-09-22LibGUI: Rename CallOnChange => AllowCallback and implement elsewherethankyouverycool
This is a helpful option to prevent unwanted side effects, distinguish between user and programmatic input, etc. Sliders and SpinBoxes were implementing it idiosyncratically, so let's generalize the API and give Buttons and TextEditors the same ability.
2021-09-03AK: Rename create<T> => make_ref_counted<T>Andreas Kling
And also try_create<T> => try_make_ref_counted<T>. A global "create" was a bit much. The new name matches make<T> better, which we've used for making single-owner objects since forever.
2021-08-19LibCpp: Handle circular imports gracefullyItamar
This patch prevents CppComprehensionEngine from endlessly looping when there's a circular #include in the code. We now keep track of the set of currently processed files, and will not re-process a file if it already exists in this set. When we're done with processing a file it is removed from this set. The pragma once directive is not yet implemented, but regardless a mechanism that prevents #include loops even in the absence of pragma once is desired.
2021-08-14LibCpp: Understand preprocessor macro definition and invocationItamar
The preprocessor now understands when a function-like macro is defined, and can also parse calls to such macros. The actual evaluation of function-like macros will be done in a separate commit.
2021-08-07LibCpp: Do macro substitution in the preprocessor instead of the parserItamar
After this change, the parser is completely separated from preprocessor concepts.
2021-08-07LibCpp: Import definitions from headers while processingItamar
When the preprocessor encounters an #include statement it now adds the preprocessor definitions that exist in the included header to its own set of definitions. We previously only aggregated the definitions from headers after processing the source, which was less correct. (For example, there could be an #ifdef that depends on a definition from another header).