chromium/v8/src/torque/ls/message-handler.cc

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <algorithm>
#include "src/torque/ls/message-handler.h"

#include "src/torque/ls/globals.h"
#include "src/torque/ls/json-parser.h"
#include "src/torque/ls/message-pipe.h"
#include "src/torque/ls/message.h"
#include "src/torque/server-data.h"
#include "src/torque/source-positions.h"
#include "src/torque/torque-compiler.h"

EXPORT_CONTEXTUAL_VARIABLE(v8::internal::torque::DiagnosticsFiles)

namespace v8 {
namespace internal {
namespace torque {

namespace ls {

static const char kContentLength[] =;
static const size_t kContentLengthSize =;

#ifdef V8_OS_WIN
// On Windows, in text mode, \n is translated to \r\n.
constexpr const char* kProtocolLineEnding = "\n\n";
#else
constexpr const char* kProtocolLineEnding =;
#endif

JsonValue ReadMessage() {}

void WriteMessage(JsonValue message) {}

namespace {

void ResetCompilationErrorDiagnostics(MessageWriter writer) {}

// Each notification must contain all diagnostics for a specific file,
// because sending multiple notifications per file resets previously sent
// diagnostics. Thus, two steps are needed:
//   1) collect all notifications in this class.
//   2) send one notification per entry (per file).
class DiagnosticCollector {};

void SendCompilationDiagnostics(const TorqueCompilerResult& result,
                                MessageWriter writer) {}

}  // namespace

void CompilationFinished(TorqueCompilerResult result, MessageWriter writer) {}

namespace {

void RecompileTorque(MessageWriter writer) {}

void RecompileTorqueWithDiagnostics(MessageWriter writer) {}

void HandleInitializeRequest(InitializeRequest request, MessageWriter writer) {}

void HandleInitializedNotification(MessageWriter writer) {}

void HandleTorqueFileListNotification(TorqueFileListNotification notification,
                                      MessageWriter writer) {}

void HandleGotoDefinitionRequest(GotoDefinitionRequest request,
                                 MessageWriter writer) {}

void HandleChangeWatchedFilesNotification(
    DidChangeWatchedFilesNotification notification, MessageWriter writer) {}

void HandleDocumentSymbolRequest(DocumentSymbolRequest request,
                                 MessageWriter writer) {}

}  // namespace

void HandleMessage(JsonValue raw_message, MessageWriter writer) {}

}  // namespace ls
}  // namespace torque
}  // namespace internal
}  // namespace v8