1 // RUN: mlir-pdll-lsp-server -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":"Pattern FooPattern {\nlet root: Op<toy.test>;\nerase root;\n}"
11 {"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{
12 "textDocument":{"uri":"test:///foo.pdll"},
13 "position":{"line":0,"character":12}
16 // CHECK-NEXT: "jsonrpc": "2.0",
17 // CHECK-NEXT: "result": [
19 // CHECK-NEXT: "range": {
20 // CHECK-NEXT: "end": {
21 // CHECK-NEXT: "character": 18,
22 // CHECK-NEXT: "line": 0
24 // CHECK-NEXT: "start": {
25 // CHECK-NEXT: "character": 8,
26 // CHECK-NEXT: "line": 0
29 // CHECK-NEXT: "uri": "{{.*}}/foo.pdll"
32 {"jsonrpc":"2.0","id":2,"method":"textDocument/definition","params":{
33 "textDocument":{"uri":"test:///foo.pdll"},
34 "position":{"line":2,"character":8}
37 // CHECK-NEXT: "jsonrpc": "2.0",
38 // CHECK-NEXT: "result": [
40 // CHECK-NEXT: "range": {
41 // CHECK-NEXT: "end": {
42 // CHECK-NEXT: "character": 8,
43 // CHECK-NEXT: "line": 1
45 // CHECK-NEXT: "start": {
46 // CHECK-NEXT: "character": 4,
47 // CHECK-NEXT: "line": 1
50 // CHECK-NEXT: "uri": "{{.*}}/foo.pdll"
53 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
55 {"jsonrpc":"2.0","method":"exit"}