1 // RUN: mlir-pdll-lsp-server -pdll-extra-dir %S -pdll-extra-dir %S/../../include -lit-test < %s | FileCheck %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"pdll","capabilities":{},"trace":"off"}}
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
5 "uri":"test:///foo.pdll",
8 "text":"#include \"include/included.td\"\n#include \"include/included.pdll\""
11 {"jsonrpc":"2.0","id":1,"method":"textDocument/documentLink","params":{
12 "textDocument":{"uri":"test:///foo.pdll"}
15 // CHECK-NEXT: "jsonrpc": "2.0",
16 // CHECK-NEXT: "result": [
18 // CHECK-NEXT: "range": {
19 // CHECK-NEXT: "end": {
20 // CHECK-NEXT: "character": 30,
21 // CHECK-NEXT: "line": 0
23 // CHECK-NEXT: "start": {
24 // CHECK-NEXT: "character": 9,
25 // CHECK-NEXT: "line": 0
28 // CHECK-NEXT: "target": "file:{{.*}}included.td"
31 // CHECK-NEXT: "range": {
32 // CHECK-NEXT: "end": {
33 // CHECK-NEXT: "character": 32,
34 // CHECK-NEXT: "line": 1
36 // CHECK-NEXT: "start": {
37 // CHECK-NEXT: "character": 9,
38 // CHECK-NEXT: "line": 1
41 // CHECK-NEXT: "target": "file:{{.*}}included.pdll"
45 {"jsonrpc":"2.0","id":7,"method":"shutdown"}
47 {"jsonrpc":"2.0","method":"exit"}