This follows the same general structure of the MLIR and PDLL language servers. This commits adds the basic functionality for setting up the server, and initially only supports providing diagnostics. Followon commits will build out more comprehensive behavior. Realistically this should eventually live in llvm/, but building in MLIR is an easier initial step given that: * All of the necessary LSP functionality is already here * It allows for proving out useful language features (e.g. compilation databases) without affecting wider scale tablegen users * MLIR has a vscode extension that can immediately take advantage of it Differential Revision: https://reviews.llvm.org/D125440
17 lines
586 B
C++
17 lines
586 B
C++
//===- tblgen-lsp-server.cpp - TableGen Language Server main --------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "mlir/Support/LogicalResult.h"
|
|
#include "mlir/Tools/tblgen-lsp-server/TableGenLspServerMain.h"
|
|
|
|
using namespace mlir;
|
|
|
|
int main(int argc, char **argv) {
|
|
return failed(TableGenLspServerMain(argc, argv));
|
|
}
|