1 // RUN: tblgen-lsp-server -lit-test < %s | FileCheck -strict-whitespace %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"tablegen","capabilities":{},"trace":"off"}}
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
5 "uri":"test:///foo.td",
6 "languageId":"tablegen",
8 "text":"class Foo;\ndef FooDerived : Foo;\n"
11 {"jsonrpc":"2.0","id":1,"method":"textDocument/references","params":{
12 "textDocument":{"uri":"test:///foo.td"},
13 "position":{"line":0,"character":7},
14 "context":{"includeDeclaration": false}
17 // CHECK-NEXT: "jsonrpc": "2.0",
18 // CHECK-NEXT: "result": [
20 // CHECK-NEXT: "range": {
21 // CHECK-NEXT: "end": {
22 // CHECK-NEXT: "character": 9,
23 // CHECK-NEXT: "line": 0
25 // CHECK-NEXT: "start": {
26 // CHECK-NEXT: "character": 6,
27 // CHECK-NEXT: "line": 0
30 // CHECK-NEXT: "uri": "{{.*}}/foo.td"
33 // CHECK-NEXT: "range": {
34 // CHECK-NEXT: "end": {
35 // CHECK-NEXT: "character": 20,
36 // CHECK-NEXT: "line": 1
38 // CHECK-NEXT: "start": {
39 // CHECK-NEXT: "character": 17,
40 // CHECK-NEXT: "line": 1
43 // CHECK-NEXT: "uri": "{{.*}}/foo.td"
47 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
49 {"jsonrpc":"2.0","method":"exit"}