brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · c45ac2e Raw
44 lines · plain
1// RUN: mlir-pdll-lsp-server -lit-test < %s | FileCheck -strict-whitespace %s2{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"pdll","capabilities":{},"trace":"off"}}3// -----4{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{5  "uri":"test:///foo.pdll",6  "languageId":"pdll",7  "version":1,8  "text":"Pattern TestPat => erase op<test.op>;"9}}}10// -----11{"jsonrpc":"2.0","id":1,"method":"pdll/viewOutput","params":{12  "uri":"test:///foo.pdll",13  "kind":"ast"14}}15//      CHECK:  "id": 116// CHECK-NEXT:  "jsonrpc": "2.0",17// CHECK-NEXT:  "result": {18// CHECK-NEXT:    "output": "-Module{{.*}}PatternDecl{{.*}}Name<TestPat>{{.*}}\n"19// CHECK-NEXT:  }20// -----21{"jsonrpc":"2.0","id":2,"method":"pdll/viewOutput","params":{22  "uri":"test:///foo.pdll",23  "kind":"mlir"24}}25//      CHECK:  "id": 226// CHECK-NEXT:  "jsonrpc": "2.0",27// CHECK-NEXT:  "result": {28// CHECK-NEXT:    "output": "module {\n  pdl.pattern @TestPat {{.*}}\n"29// CHECK-NEXT:  }30// -----31{"jsonrpc":"2.0","id":3,"method":"pdll/viewOutput","params":{32  "uri":"test:///foo.pdll",33  "kind":"cpp"34}}35//      CHECK:  "id": 336// CHECK-NEXT:  "jsonrpc": "2.0",37// CHECK-NEXT:  "result": {38// CHECK-NEXT:    "output": "{{.*}}struct TestPat : ::mlir::PDLPatternModule{{.*}}\n"39// CHECK-NEXT:  }40// -----41{"jsonrpc":"2.0","id":3,"method":"shutdown"}42// -----43{"jsonrpc":"2.0","method":"exit"}44