blob: 4e3bfd0297c2434a00f391ae23ffb913e984f74e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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();
}
|