[mlir][PDLL] Add an initial language server for PDLL
authorRiver Riddle <riddleriver@gmail.com>
Fri, 11 Mar 2022 07:44:53 +0000 (23:44 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Sat, 19 Mar 2022 20:28:23 +0000 (13:28 -0700)
commit52b34df9d670e948a97dd72b8b5a426d7b3007c7
tree15c31e0289c6647f619feebfd60d9062eec81df1
parent1a820ff03910e7def89766296fa2ea41ff1a52fc
[mlir][PDLL] Add an initial language server for PDLL

This commits adds a basic language server for PDLL to enable providing
language features in IDEs such as VSCode. This initial commit only
adds support for tracking definitions, references, and diagnostics, but
followup commits will build upon this to provide more significant behavior.

In addition to the server, this commit also updates mlir-vscode to support
the PDLL language and invoke the server.

Differential Revision: https://reviews.llvm.org/D121541
31 files changed:
mlir/include/mlir/Tools/PDLL/AST/Nodes.h
mlir/include/mlir/Tools/mlir-pdll-lsp-server/MlirPdllLspServerMain.h [new file with mode: 0644]
mlir/lib/Tools/CMakeLists.txt
mlir/lib/Tools/PDLL/AST/Nodes.cpp
mlir/lib/Tools/lsp-server-support/Protocol.h
mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
mlir/lib/Tools/mlir-pdll-lsp-server/CMakeLists.txt [new file with mode: 0644]
mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp [new file with mode: 0644]
mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.h [new file with mode: 0644]
mlir/lib/Tools/mlir-pdll-lsp-server/MlirPdllLspServerMain.cpp [new file with mode: 0644]
mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp [new file with mode: 0644]
mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.h [new file with mode: 0644]
mlir/test/CMakeLists.txt
mlir/test/mlir-pdll-lsp-server/definition-split-file.test [new file with mode: 0644]
mlir/test/mlir-pdll-lsp-server/definition.test [new file with mode: 0644]
mlir/test/mlir-pdll-lsp-server/exit-eof.test [new file with mode: 0644]
mlir/test/mlir-pdll-lsp-server/exit-with-shutdown.test [new file with mode: 0644]
mlir/test/mlir-pdll-lsp-server/exit-without-shutdown.test [new file with mode: 0644]
mlir/test/mlir-pdll-lsp-server/initialize-params-invalid.test [new file with mode: 0644]
mlir/test/mlir-pdll-lsp-server/initialize-params.test [new file with mode: 0644]
mlir/test/mlir-pdll-lsp-server/references.test [new file with mode: 0644]
mlir/tools/CMakeLists.txt
mlir/tools/mlir-pdll-lsp-server/CMakeLists.txt [new file with mode: 0644]
mlir/tools/mlir-pdll-lsp-server/mlir-pdll-lsp-server.cpp [new file with mode: 0644]
mlir/utils/vscode/package-lock.json
mlir/utils/vscode/package.json
mlir/utils/vscode/pdll-grammar.json [new file with mode: 0644]
mlir/utils/vscode/pdll-language-configuration.json [new file with mode: 0644]
mlir/utils/vscode/src/configWatcher.ts
mlir/utils/vscode/src/extension.ts
mlir/utils/vscode/src/mlirContext.ts