From 0c64995ea28febcc7d38e1519da8d93391ce2e7d Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 7 Jun 2022 14:10:49 -0700 Subject: Major language server features. (#2264) * Major language server features. * Include slangd in binary release. * Fix compiler issues. * Fix compiler error. * Completion resolve. * Various improvements. * Update diagnostic test expected output. * Bug fix for source locations. * Adjust diagnostic update frequency. * Update github actions to store artifacts. * Fix infinite parser loop. * Fix parser recovery. * Fix parser recovery. * Update test. * Fix test. * Disable IR gen for language server. * Allow commit characters in auto completion. * Fix lookup for invoke exprs. * More parser robustness fixes. * update solution file Co-authored-by: Yong He --- tools/slangd/main.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tools/slangd/main.cpp (limited to 'tools/slangd/main.cpp') diff --git a/tools/slangd/main.cpp b/tools/slangd/main.cpp new file mode 100644 index 000000000..4e3bfd029 --- /dev/null +++ b/tools/slangd/main.cpp @@ -0,0 +1,25 @@ +// main.cpp + +// This file implements the entry point for `slangd`, the daemon process of Slang's language server. + +#include + +#include "../../source/core/slang-basic.h" +#include "../../source/slang/slang-language-server.h" + +int main(int argc, const char* const* argv) +{ + bool isDebug = false; + for (auto i = 1; i < argc; i++) + { + if (Slang::UnownedStringSlice(argv[i]) == "--debug") + { + isDebug = true; + } + } + if (isDebug) + { + std::this_thread::sleep_for(std::chrono::seconds(10)); + } + return Slang::runLanguageServer(); +} -- cgit v1.2.3