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 ValueCst(value: Value, value2: Value);\nPattern {\nlet root = op<test.multi>(val: Value, val) -> (ty: Type, ty);\nValueCst(root.result, root.result2);\nerase root;\n}"
11 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{
12 "textDocument":{"uri":"test:///foo.pdll"},
13 "position":{"line":3,"character":26}
16 // CHECK-NEXT: "jsonrpc": "2.0",
17 // CHECK-NEXT: "result": {
18 // CHECK-NEXT: "activeParameter": 0,
19 // CHECK-NEXT: "activeSignature": 0,
20 // CHECK-NEXT: "signatures": [
22 // CHECK-NEXT: "documentation": "`op<test.multi>` ODS operand specification",
23 // CHECK-NEXT: "label": "(operand: Value, operand2: Value)",
24 // CHECK-NEXT: "parameters": [
26 // CHECK-NEXT: "documentation": "64-bit signless integer",
27 // CHECK-NEXT: "label": [
33 // CHECK-NEXT: "documentation": "64-bit signless integer",
34 // CHECK-NEXT: "label": [
42 // CHECK-NEXT: "documentation": "Generic operation operand specification",
43 // CHECK-NEXT: "label": "(<operands>: ValueRange)",
44 // CHECK-NEXT: "parameters": [
46 // CHECK-NEXT: "documentation": "All of the operands of the operation.",
47 // CHECK-NEXT: "label": [
57 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{
58 "textDocument":{"uri":"test:///foo.pdll"},
59 "position":{"line":3,"character":38}
62 // CHECK-NEXT: "jsonrpc": "2.0",
63 // CHECK-NEXT: "result": {
64 // CHECK-NEXT: "activeParameter": 1,
65 // CHECK-NEXT: "activeSignature": 0,
66 // CHECK-NEXT: "signatures": [
68 // CHECK-NEXT: "documentation": "`op<test.multi>` ODS operand specification",
69 // CHECK-NEXT: "label": "(operand: Value, operand2: Value)",
70 // CHECK-NEXT: "parameters": [
72 // CHECK-NEXT: "documentation": "64-bit signless integer",
73 // CHECK-NEXT: "label": [
79 // CHECK-NEXT: "documentation": "64-bit signless integer",
80 // CHECK-NEXT: "label": [
90 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{
91 "textDocument":{"uri":"test:///foo.pdll"},
92 "position":{"line":3,"character":47}
95 // CHECK-NEXT: "jsonrpc": "2.0",
96 // CHECK-NEXT: "result": {
97 // CHECK-NEXT: "activeParameter": 0,
98 // CHECK-NEXT: "activeSignature": 0,
99 // CHECK-NEXT: "signatures": [
101 // CHECK-NEXT: "documentation": "`op<test.multi>` ODS result specification",
102 // CHECK-NEXT: "label": "(result: Type, result2: Type)",
103 // CHECK-NEXT: "parameters": [
105 // CHECK-NEXT: "documentation": "64-bit signless integer",
106 // CHECK-NEXT: "label": [
112 // CHECK-NEXT: "documentation": "64-bit signless integer",
113 // CHECK-NEXT: "label": [
121 // CHECK-NEXT: "documentation": "Generic operation result specification",
122 // CHECK-NEXT: "label": "(<results>: TypeRange)",
123 // CHECK-NEXT: "parameters": [
125 // CHECK-NEXT: "documentation": "All of the results of the operation.",
126 // CHECK-NEXT: "label": [
136 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{
137 "textDocument":{"uri":"test:///foo.pdll"},
138 "position":{"line":3,"character":57}
141 // CHECK-NEXT: "jsonrpc": "2.0",
142 // CHECK-NEXT: "result": {
143 // CHECK-NEXT: "activeParameter": 1,
144 // CHECK-NEXT: "activeSignature": 0,
145 // CHECK-NEXT: "signatures": [
147 // CHECK-NEXT: "documentation": "`op<test.multi>` ODS result specification",
148 // CHECK-NEXT: "label": "(result: Type, result2: Type)",
149 // CHECK-NEXT: "parameters": [
151 // CHECK-NEXT: "documentation": "64-bit signless integer",
152 // CHECK-NEXT: "label": [
158 // CHECK-NEXT: "documentation": "64-bit signless integer",
159 // CHECK-NEXT: "label": [
169 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{
170 "textDocument":{"uri":"test:///foo.pdll"},
171 "position":{"line":4,"character":9}
174 // CHECK-NEXT: "jsonrpc": "2.0",
175 // CHECK-NEXT: "result": {
176 // CHECK-NEXT: "activeParameter": 0,
177 // CHECK-NEXT: "activeSignature": 0,
178 // CHECK-NEXT: "signatures": [
180 // CHECK-NEXT: "label": "ValueCst(value: Value, value2: Value) -> Tuple<>",
181 // CHECK-NEXT: "parameters": [
183 // CHECK-NEXT: "label": [
189 // CHECK-NEXT: "label": [
199 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{
200 "textDocument":{"uri":"test:///foo.pdll"},
201 "position":{"line":4,"character":21}
204 // CHECK-NEXT: "jsonrpc": "2.0",
205 // CHECK-NEXT: "result": {
206 // CHECK-NEXT: "activeParameter": 1,
207 // CHECK-NEXT: "activeSignature": 0,
208 // CHECK-NEXT: "signatures": [
210 // CHECK-NEXT: "label": "ValueCst(value: Value, value2: Value) -> Tuple<>",
211 // CHECK-NEXT: "parameters": [
213 // CHECK-NEXT: "label": [
219 // CHECK-NEXT: "label": [
229 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
231 {"jsonrpc":"2.0","method":"exit"}