1 // RUN: mlir-pdll-lsp-server -pdll-extra-dir %S -pdll-extra-dir %S/../../include -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":"#include \"include/included.td\"\nConstraint Cst(attr: Attr);\nPattern {\n op<test.multi>(_: Value, _: Value);\n op<test.multi>(_: ValueRange) -> (_: Type, _: Type);\n let op = op<test.multi>;\n let value = op.0;\n Cst(_: Attr);\n erase op;\n}\n"
11 {"jsonrpc":"2.0","id":2,"method":"textDocument/inlayHint","params":{
12 "textDocument":{"uri":"test:///foo.pdll"},
14 "start": {"line":3,"character":0},
15 "end": {"line":5,"character":0}
19 // CHECK-NEXT: "jsonrpc": "2.0",
20 // CHECK-NEXT: "result": [
22 // CHECK-NEXT: "kind": 2,
23 // CHECK-NEXT: "label": "operand:",
24 // CHECK-NEXT: "paddingLeft": false,
25 // CHECK-NEXT: "paddingRight": true,
26 // CHECK-NEXT: "position": {
27 // CHECK-NEXT: "character": 17,
28 // CHECK-NEXT: "line": 3
32 // CHECK-NEXT: "kind": 2,
33 // CHECK-NEXT: "label": "operand2:",
34 // CHECK-NEXT: "paddingLeft": false,
35 // CHECK-NEXT: "paddingRight": true,
36 // CHECK-NEXT: "position": {
37 // CHECK-NEXT: "character": 27,
38 // CHECK-NEXT: "line": 3
42 // CHECK-NEXT: "kind": 2,
43 // CHECK-NEXT: "label": "operands:",
44 // CHECK-NEXT: "paddingLeft": false,
45 // CHECK-NEXT: "paddingRight": true,
46 // CHECK-NEXT: "position": {
47 // CHECK-NEXT: "character": 17,
48 // CHECK-NEXT: "line": 4
52 // CHECK-NEXT: "kind": 2,
53 // CHECK-NEXT: "label": "result:",
54 // CHECK-NEXT: "paddingLeft": false,
55 // CHECK-NEXT: "paddingRight": true,
56 // CHECK-NEXT: "position": {
57 // CHECK-NEXT: "character": 36,
58 // CHECK-NEXT: "line": 4
62 // CHECK-NEXT: "kind": 2,
63 // CHECK-NEXT: "label": "result2:",
64 // CHECK-NEXT: "paddingLeft": false,
65 // CHECK-NEXT: "paddingRight": true,
66 // CHECK-NEXT: "position": {
67 // CHECK-NEXT: "character": 45,
68 // CHECK-NEXT: "line": 4
73 {"jsonrpc":"2.0","id":3,"method":"textDocument/inlayHint","params":{
74 "textDocument":{"uri":"test:///foo.pdll"},
76 "start": {"line":5,"character":0},
77 "end": {"line":8,"character":0}
81 // CHECK-NEXT: "jsonrpc": "2.0",
82 // CHECK-NEXT: "result": [
84 // CHECK-NEXT: "kind": 1,
85 // CHECK-NEXT: "label": ": Value",
86 // CHECK-NEXT: "paddingLeft": false,
87 // CHECK-NEXT: "paddingRight": false,
88 // CHECK-NEXT: "position": {
89 // CHECK-NEXT: "character": 11,
90 // CHECK-NEXT: "line": 6
94 // CHECK-NEXT: "kind": 2,
95 // CHECK-NEXT: "label": "attr:",
96 // CHECK-NEXT: "paddingLeft": false,
97 // CHECK-NEXT: "paddingRight": true,
98 // CHECK-NEXT: "position": {
99 // CHECK-NEXT: "character": 6,
100 // CHECK-NEXT: "line": 7
105 {"jsonrpc":"2.0","id":4,"method":"shutdown"}
107 {"jsonrpc":"2.0","method":"exit"}