1 // RUN: mlir-pdll-lsp-server -lit-test < %s | FileCheck -strict-whitespace %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 TestPat => erase op<test.op>;"
11 {"jsonrpc":"2.0","id":1,"method":"pdll/viewOutput","params":{
12 "uri":"test:///foo.pdll",
16 // CHECK-NEXT: "jsonrpc": "2.0",
17 // CHECK-NEXT: "result": {
18 // CHECK-NEXT: "output": "-Module{{.*}}PatternDecl{{.*}}Name<TestPat>{{.*}}\n"
21 {"jsonrpc":"2.0","id":2,"method":"pdll/viewOutput","params":{
22 "uri":"test:///foo.pdll",
26 // CHECK-NEXT: "jsonrpc": "2.0",
27 // CHECK-NEXT: "result": {
28 // CHECK-NEXT: "output": "module {\n pdl.pattern @TestPat {{.*}}\n"
31 {"jsonrpc":"2.0","id":3,"method":"pdll/viewOutput","params":{
32 "uri":"test:///foo.pdll",
36 // CHECK-NEXT: "jsonrpc": "2.0",
37 // CHECK-NEXT: "result": {
38 // CHECK-NEXT: "output": "{{.*}}struct TestPat : ::mlir::PDLPatternModule{{.*}}\n"
41 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
43 {"jsonrpc":"2.0","method":"exit"}