diff options
Diffstat (limited to 'tools/slangd/main.cpp')
| -rw-r--r-- | tools/slangd/main.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
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 <thread> + +#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(); +} |
