@morphql/language-definitions 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,533 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ FUNCTIONS: () => FUNCTIONS,
24
+ KEYWORDS: () => KEYWORDS,
25
+ MORPHQL_LANGUAGE: () => MORPHQL_LANGUAGE,
26
+ OPERATORS: () => OPERATORS,
27
+ generateHoverDocs: () => generateHoverDocs,
28
+ generateMonacoLanguageConfig: () => generateMonacoLanguageConfig,
29
+ generateTextMateFunctionsPattern: () => generateTextMateFunctionsPattern,
30
+ generateTextMateKeywordsPattern: () => generateTextMateKeywordsPattern,
31
+ getFunctionDoc: () => getFunctionDoc,
32
+ getFunctionNames: () => getFunctionNames,
33
+ getKeywordDoc: () => getKeywordDoc,
34
+ getKeywordNames: () => getKeywordNames,
35
+ getKeywordsByCategory: () => getKeywordsByCategory,
36
+ getMultiCharOperators: () => getMultiCharOperators,
37
+ getOperatorSymbols: () => getOperatorSymbols,
38
+ getOperatorsByCategory: () => getOperatorsByCategory,
39
+ getSingleCharOperators: () => getSingleCharOperators
40
+ });
41
+ module.exports = __toCommonJS(index_exports);
42
+
43
+ // src/keywords.ts
44
+ var KEYWORDS = [
45
+ {
46
+ name: "from",
47
+ category: "control",
48
+ doc: {
49
+ signature: "from <format>",
50
+ description: "Specifies the input data format.",
51
+ parameters: [
52
+ {
53
+ name: "format",
54
+ description: "If used as first keyword: The starting format, one of `json`, `xml`, or `object`. When used after a section, defines its source"
55
+ }
56
+ ],
57
+ example: "from json to xml"
58
+ }
59
+ },
60
+ {
61
+ name: "to",
62
+ category: "control",
63
+ doc: {
64
+ signature: "to <format>",
65
+ description: "Specifies the output data format.",
66
+ parameters: [
67
+ { name: "format", description: "One of: `json`, `xml`, or `object`" }
68
+ ],
69
+ example: "from json to xml"
70
+ }
71
+ },
72
+ {
73
+ name: "transform",
74
+ category: "control",
75
+ doc: {
76
+ signature: "transform",
77
+ description: "Begins the transformation block containing actions.",
78
+ example: "transform\n set name = firstName"
79
+ }
80
+ },
81
+ {
82
+ name: "set",
83
+ category: "action",
84
+ doc: {
85
+ signature: "set <target> = <expression>",
86
+ description: "Assigns a value to a field in the output.",
87
+ parameters: [
88
+ { name: "target", description: "The field name to set" },
89
+ {
90
+ name: "expression",
91
+ description: "The value or expression to assign"
92
+ }
93
+ ],
94
+ example: 'set fullName = firstName + " " + lastName'
95
+ }
96
+ },
97
+ {
98
+ name: "section",
99
+ category: "action",
100
+ doc: {
101
+ signature: "section [multiple] <name>( [subquery] <actions> ) [from <path>]",
102
+ description: "Creates a nested object or array in the output. Can optionally include a subquery for format conversion.",
103
+ parameters: [
104
+ { name: "multiple", description: "(Optional) Treat as array mapping" },
105
+ { name: "name", description: "The section/field name" },
106
+ {
107
+ name: "subquery",
108
+ description: "(Optional) Nested query: from <format> to <format> [transform]"
109
+ },
110
+ {
111
+ name: "actions",
112
+ description: "Actions to perform within the section"
113
+ },
114
+ {
115
+ name: "from",
116
+ description: "(Optional) Source path for the section data"
117
+ }
118
+ ],
119
+ example: "section metadata(\n from xml to object\n transform\n set name = root.productName\n) from xmlString"
120
+ }
121
+ },
122
+ {
123
+ name: "multiple",
124
+ category: "action",
125
+ doc: {
126
+ signature: "section multiple <name>(...)",
127
+ description: "Modifier for `section` to map over an array.",
128
+ example: "section multiple items(\n set id = itemId\n) from products"
129
+ }
130
+ },
131
+ {
132
+ name: "clone",
133
+ category: "action",
134
+ doc: {
135
+ signature: "clone([field1, field2, ...])",
136
+ description: "Copies fields from the source to the output.",
137
+ parameters: [
138
+ {
139
+ name: "fields",
140
+ description: "(Optional) Specific fields to clone. If omitted, clones all fields."
141
+ }
142
+ ],
143
+ example: "clone(id, name, email)"
144
+ }
145
+ },
146
+ {
147
+ name: "delete",
148
+ category: "action",
149
+ doc: {
150
+ signature: "delete <field>",
151
+ description: "Removes a field from the output (useful after `clone`).",
152
+ parameters: [{ name: "field", description: "The field name to delete" }],
153
+ example: "clone()\ndelete password"
154
+ }
155
+ },
156
+ {
157
+ name: "define",
158
+ category: "action",
159
+ doc: {
160
+ signature: "define <alias> = <expression>",
161
+ description: "Creates a local variable/alias for use in subsequent expressions.",
162
+ parameters: [
163
+ { name: "alias", description: "The variable name" },
164
+ { name: "expression", description: "The value to assign" }
165
+ ],
166
+ example: "define taxRate = 0.22\nset totalWithTax = total * (1 + taxRate)"
167
+ }
168
+ },
169
+ {
170
+ name: "if",
171
+ category: "control",
172
+ doc: {
173
+ signature: "if (condition) ( actions ) [else ( actions )]",
174
+ description: "Conditional execution of action blocks.",
175
+ parameters: [
176
+ { name: "condition", description: "Boolean expression" },
177
+ { name: "actions", description: "Actions to execute if true/false" }
178
+ ],
179
+ example: 'if (age >= 18) (\n set status = "adult"\n) else (\n set status = "minor"\n)'
180
+ }
181
+ },
182
+ {
183
+ name: "else",
184
+ category: "control",
185
+ doc: {
186
+ signature: "else ( actions )",
187
+ description: "Defines the else branch of an `if` statement.",
188
+ example: "if (condition) (\n ...\n) else (\n ...\n)"
189
+ }
190
+ },
191
+ {
192
+ name: "modify",
193
+ category: "action",
194
+ doc: {
195
+ signature: "modify <target> = <expression>",
196
+ description: "Modifies a field in the output by reading from the target (not source). Useful for post-processing already-mapped values.",
197
+ parameters: [
198
+ { name: "target", description: "The field name to modify" },
199
+ {
200
+ name: "expression",
201
+ description: "The expression to assign (reads from target, not source)"
202
+ }
203
+ ],
204
+ example: "set total = price * quantity\nmodify total = total * 1.10"
205
+ }
206
+ }
207
+ ];
208
+ var getKeywordsByCategory = (category) => KEYWORDS.filter((k) => k.category === category);
209
+ var getKeywordNames = () => KEYWORDS.map((k) => k.name);
210
+ var getKeywordDoc = (name) => KEYWORDS.find((k) => k.name.toLowerCase() === name.toLowerCase())?.doc;
211
+
212
+ // src/functions.ts
213
+ var FUNCTIONS = [
214
+ {
215
+ name: "substring",
216
+ doc: {
217
+ signature: "substring(str, start, [length])",
218
+ description: "Extracts a portion of a string. Supports negative indices.",
219
+ parameters: [
220
+ { name: "str", description: "The source string" },
221
+ {
222
+ name: "start",
223
+ description: "Starting index (0-based, negative counts from end)"
224
+ },
225
+ {
226
+ name: "length",
227
+ description: "(Optional) Number of characters to extract"
228
+ }
229
+ ],
230
+ returns: "string",
231
+ example: 'substring("Hello World", 0, 5) // "Hello"\nsubstring("Hello World", -5) // "World"'
232
+ }
233
+ },
234
+ {
235
+ name: "split",
236
+ doc: {
237
+ signature: "split(str, [separator], [limit])",
238
+ description: "Splits a string into an array.",
239
+ parameters: [
240
+ { name: "str", description: "The string to split" },
241
+ {
242
+ name: "separator",
243
+ description: '(Optional) Delimiter string. Default: ""'
244
+ },
245
+ { name: "limit", description: "(Optional) Maximum number of splits" }
246
+ ],
247
+ returns: "array",
248
+ example: 'split("a,b,c", ",") // ["a", "b", "c"]'
249
+ }
250
+ },
251
+ {
252
+ name: "replace",
253
+ doc: {
254
+ signature: "replace(str, search, replacement)",
255
+ description: "Replaces occurrences in a string.",
256
+ parameters: [
257
+ { name: "str", description: "The source string" },
258
+ { name: "search", description: "The substring to find" },
259
+ { name: "replacement", description: "The replacement string" }
260
+ ],
261
+ returns: "string",
262
+ example: 'replace("Hello World", "World", "MorphQL") // "Hello MorphQL"'
263
+ }
264
+ },
265
+ {
266
+ name: "text",
267
+ doc: {
268
+ signature: "text(value)",
269
+ description: "Converts a value to a string.",
270
+ parameters: [{ name: "value", description: "The value to convert" }],
271
+ returns: "string",
272
+ example: 'text(123) // "123"'
273
+ }
274
+ },
275
+ {
276
+ name: "number",
277
+ doc: {
278
+ signature: "number(value)",
279
+ description: "Converts a value to a number.",
280
+ parameters: [{ name: "value", description: "The value to convert" }],
281
+ returns: "number",
282
+ example: 'number("42") // 42'
283
+ }
284
+ },
285
+ {
286
+ name: "uppercase",
287
+ doc: {
288
+ signature: "uppercase(str)",
289
+ description: "Converts a string to uppercase.",
290
+ parameters: [{ name: "str", description: "The string to convert" }],
291
+ returns: "string",
292
+ example: 'uppercase("hello") // "HELLO"'
293
+ }
294
+ },
295
+ {
296
+ name: "lowercase",
297
+ doc: {
298
+ signature: "lowercase(str)",
299
+ description: "Converts a string to lowercase.",
300
+ parameters: [{ name: "str", description: "The string to convert" }],
301
+ returns: "string",
302
+ example: 'lowercase("HELLO") // "hello"'
303
+ }
304
+ },
305
+ {
306
+ name: "extractnumber",
307
+ doc: {
308
+ signature: "extractnumber(str)",
309
+ description: "Extracts the first numeric sequence from a string.",
310
+ parameters: [{ name: "str", description: "The string to extract from" }],
311
+ returns: "number",
312
+ example: 'extractnumber("Price: 100USD") // 100'
313
+ }
314
+ },
315
+ {
316
+ name: "xmlnode",
317
+ doc: {
318
+ signature: "xmlnode(value, [attrKey, attrVal, ...])",
319
+ description: "Wraps a value for XML output with optional attributes.",
320
+ parameters: [
321
+ { name: "value", description: "The node content" },
322
+ {
323
+ name: "attrKey, attrVal",
324
+ description: "(Optional) Pairs of attribute keys and values"
325
+ }
326
+ ],
327
+ returns: "XML node",
328
+ example: 'xmlnode(content, "id", 1, "type", "text")'
329
+ }
330
+ },
331
+ {
332
+ name: "to_base64",
333
+ doc: {
334
+ signature: "to_base64(value)",
335
+ description: "Encodes a string value to Base64.",
336
+ parameters: [{ name: "value", description: "The string to encode" }],
337
+ returns: "string",
338
+ example: 'to_base64("hello") // "aGVsbG8="'
339
+ }
340
+ },
341
+ {
342
+ name: "from_base64",
343
+ doc: {
344
+ signature: "from_base64(value)",
345
+ description: "Decodes a Base64 string value.",
346
+ parameters: [
347
+ { name: "value", description: "The Base64 string to decode" }
348
+ ],
349
+ returns: "string",
350
+ example: 'from_base64("aGVsbG8=") // "hello"'
351
+ }
352
+ },
353
+ {
354
+ name: "aslist",
355
+ doc: {
356
+ signature: "aslist(value)",
357
+ description: "Ensures a value is an array. Useful for XML nodes that might be a single object or an array.",
358
+ parameters: [{ name: "value", description: "The value to normalize" }],
359
+ returns: "array",
360
+ example: "aslist(items) // Always returns an array"
361
+ }
362
+ }
363
+ ];
364
+ var getFunctionNames = () => FUNCTIONS.map((f) => f.name);
365
+ var getFunctionDoc = (name) => FUNCTIONS.find((f) => f.name.toLowerCase() === name.toLowerCase())?.doc;
366
+
367
+ // src/operators.ts
368
+ var OPERATORS = [
369
+ // Comparison operators
370
+ { symbol: "===", category: "comparison", precedence: 7 },
371
+ { symbol: "!==", category: "comparison", precedence: 7 },
372
+ { symbol: "==", category: "comparison", precedence: 7 },
373
+ { symbol: "!=", category: "comparison", precedence: 7 },
374
+ { symbol: "<=", category: "comparison", precedence: 6 },
375
+ { symbol: ">=", category: "comparison", precedence: 6 },
376
+ { symbol: "<", category: "comparison", precedence: 6 },
377
+ { symbol: ">", category: "comparison", precedence: 6 },
378
+ // Logical operators
379
+ { symbol: "&&", category: "logical", precedence: 5 },
380
+ { symbol: "||", category: "logical", precedence: 4 },
381
+ { symbol: "!", category: "logical", precedence: 9 },
382
+ // Arithmetic operators
383
+ { symbol: "+", category: "arithmetic", precedence: 10 },
384
+ { symbol: "-", category: "arithmetic", precedence: 10 },
385
+ { symbol: "*", category: "arithmetic", precedence: 11 },
386
+ { symbol: "/", category: "arithmetic", precedence: 11 },
387
+ // Assignment
388
+ { symbol: "=", category: "assignment", precedence: 1 }
389
+ ];
390
+ var getOperatorsByCategory = (category) => OPERATORS.filter((op) => op.category === category);
391
+ var getOperatorSymbols = () => OPERATORS.map((op) => op.symbol);
392
+ var getMultiCharOperators = () => OPERATORS.filter((op) => op.symbol.length > 1).map((op) => op.symbol);
393
+ var getSingleCharOperators = () => OPERATORS.filter((op) => op.symbol.length === 1).map((op) => op.symbol);
394
+
395
+ // src/index.ts
396
+ var MORPHQL_LANGUAGE = {
397
+ keywords: KEYWORDS,
398
+ functions: FUNCTIONS,
399
+ operators: OPERATORS,
400
+ comments: {
401
+ line: "//",
402
+ blockStart: "/*",
403
+ blockEnd: "*/"
404
+ }
405
+ };
406
+ function generateTextMateKeywordsPattern() {
407
+ const controlKeywords = getKeywordsByCategory("control").map((k) => k.name);
408
+ const actionKeywords = getKeywordsByCategory("action").map((k) => k.name);
409
+ return JSON.stringify(
410
+ {
411
+ patterns: [
412
+ {
413
+ name: "keyword.control.morphql",
414
+ match: `\\b(${controlKeywords.join("|")})\\b`
415
+ },
416
+ {
417
+ name: "keyword.other.morphql",
418
+ match: `\\b(${actionKeywords.join("|")})\\b`
419
+ }
420
+ ]
421
+ },
422
+ null,
423
+ 2
424
+ );
425
+ }
426
+ function generateTextMateFunctionsPattern() {
427
+ const functionNames = getFunctionNames();
428
+ return JSON.stringify(
429
+ {
430
+ patterns: [
431
+ {
432
+ name: "entity.name.function.morphql",
433
+ match: `\\b(${functionNames.join("|")})(?=\\s*\\()`
434
+ }
435
+ ]
436
+ },
437
+ null,
438
+ 2
439
+ );
440
+ }
441
+ function generateMonacoLanguageConfig() {
442
+ return {
443
+ keywords: getKeywordNames(),
444
+ builtinFunctions: getFunctionNames(),
445
+ operators: getOperatorSymbols(),
446
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
447
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
448
+ tokenizer: {
449
+ root: [
450
+ // Comments
451
+ [/\/\/.*$/, "comment"],
452
+ [/\/\*/, "comment", "@comment"],
453
+ // Keywords
454
+ [
455
+ /[a-zA-Z_$][\w$]*/,
456
+ {
457
+ cases: {
458
+ "@keywords": "keyword",
459
+ "@builtinFunctions": "predefined",
460
+ "@default": "identifier"
461
+ }
462
+ }
463
+ ],
464
+ // Strings
465
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
466
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
467
+ [/"/, "string", "@string_double"],
468
+ [/'/, "string", "@string_single"],
469
+ // Numbers
470
+ [/-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/, "number"],
471
+ // Operators
472
+ [/[{}()\[\]]/, "@brackets"],
473
+ [
474
+ /@symbols/,
475
+ {
476
+ cases: {
477
+ "@operators": "operator",
478
+ "@default": ""
479
+ }
480
+ }
481
+ ]
482
+ ],
483
+ comment: [
484
+ [/[^\/*]+/, "comment"],
485
+ [/\*\//, "comment", "@pop"],
486
+ [/[\/*]/, "comment"]
487
+ ],
488
+ string_double: [
489
+ [/[^\\"]+/, "string"],
490
+ [/@escapes/, "string.escape"],
491
+ [/\\./, "string.escape.invalid"],
492
+ [/"/, "string", "@pop"]
493
+ ],
494
+ string_single: [
495
+ [/[^\\']+/, "string"],
496
+ [/@escapes/, "string.escape"],
497
+ [/\\./, "string.escape.invalid"],
498
+ [/'/, "string", "@pop"]
499
+ ]
500
+ }
501
+ };
502
+ }
503
+ function generateHoverDocs() {
504
+ const keywordDocs = {};
505
+ KEYWORDS.forEach((k) => {
506
+ keywordDocs[k.name] = k.doc;
507
+ });
508
+ const functionDocs = {};
509
+ FUNCTIONS.forEach((f) => {
510
+ functionDocs[f.name] = f.doc;
511
+ });
512
+ return { keywordDocs, functionDocs };
513
+ }
514
+ // Annotate the CommonJS export names for ESM import in node:
515
+ 0 && (module.exports = {
516
+ FUNCTIONS,
517
+ KEYWORDS,
518
+ MORPHQL_LANGUAGE,
519
+ OPERATORS,
520
+ generateHoverDocs,
521
+ generateMonacoLanguageConfig,
522
+ generateTextMateFunctionsPattern,
523
+ generateTextMateKeywordsPattern,
524
+ getFunctionDoc,
525
+ getFunctionNames,
526
+ getKeywordDoc,
527
+ getKeywordNames,
528
+ getKeywordsByCategory,
529
+ getMultiCharOperators,
530
+ getOperatorSymbols,
531
+ getOperatorsByCategory,
532
+ getSingleCharOperators
533
+ });
@@ -0,0 +1,142 @@
1
+ /**
2
+ * Documentation entry for a keyword or function
3
+ */
4
+ interface DocEntry {
5
+ signature: string;
6
+ description: string;
7
+ parameters?: {
8
+ name: string;
9
+ description: string;
10
+ }[];
11
+ returns?: string;
12
+ example?: string;
13
+ category?: "control" | "action" | "function" | "operator";
14
+ }
15
+ /**
16
+ * Keyword definition
17
+ */
18
+ interface KeywordDef {
19
+ name: string;
20
+ category: "control" | "action";
21
+ doc: DocEntry;
22
+ }
23
+ /**
24
+ * Function definition
25
+ */
26
+ interface FunctionDef {
27
+ name: string;
28
+ doc: DocEntry;
29
+ }
30
+ /**
31
+ * Operator definition
32
+ */
33
+ interface OperatorDef {
34
+ symbol: string;
35
+ category: "arithmetic" | "comparison" | "logical" | "assignment";
36
+ precedence?: number;
37
+ }
38
+ /**
39
+ * Complete language definition
40
+ */
41
+ interface LanguageDefinition {
42
+ keywords: KeywordDef[];
43
+ functions: FunctionDef[];
44
+ operators: OperatorDef[];
45
+ comments: {
46
+ line: string;
47
+ blockStart: string;
48
+ blockEnd: string;
49
+ };
50
+ }
51
+
52
+ /**
53
+ * MorphQL Keywords - Single source of truth
54
+ *
55
+ * When adding a new keyword:
56
+ * 1. Add it here
57
+ * 2. Update the lexer in @morphql/core
58
+ * 3. Run build to regenerate VSCode/Monaco configs
59
+ */
60
+ declare const KEYWORDS: KeywordDef[];
61
+ declare const getKeywordsByCategory: (category: "control" | "action") => KeywordDef[];
62
+ declare const getKeywordNames: () => string[];
63
+ declare const getKeywordDoc: (name: string) => DocEntry | undefined;
64
+
65
+ /**
66
+ * MorphQL Functions - Single source of truth
67
+ *
68
+ * When adding a new function:
69
+ * 1. Add it here
70
+ * 2. Implement in @morphql/core/src/functions.ts
71
+ * 3. Run build to regenerate VSCode/Monaco configs
72
+ */
73
+ declare const FUNCTIONS: FunctionDef[];
74
+ declare const getFunctionNames: () => string[];
75
+ declare const getFunctionDoc: (name: string) => DocEntry | undefined;
76
+
77
+ /**
78
+ * MorphQL Operators - Single source of truth
79
+ *
80
+ * When adding a new operator:
81
+ * 1. Add it here
82
+ * 2. Update the lexer in @morphql/core (MIND THE ORDER!)
83
+ * 3. Run build to regenerate VSCode/Monaco configs
84
+ */
85
+ declare const OPERATORS: OperatorDef[];
86
+ declare const getOperatorsByCategory: (category: OperatorDef["category"]) => OperatorDef[];
87
+ declare const getOperatorSymbols: () => string[];
88
+ declare const getMultiCharOperators: () => string[];
89
+ declare const getSingleCharOperators: () => string[];
90
+
91
+ /**
92
+ * Complete MorphQL language definition
93
+ */
94
+ declare const MORPHQL_LANGUAGE: LanguageDefinition;
95
+
96
+ /**
97
+ * Generators for different platforms
98
+ */
99
+ /**
100
+ * Generate TextMate grammar keywords pattern
101
+ */
102
+ declare function generateTextMateKeywordsPattern(): string;
103
+ /**
104
+ * Generate TextMate grammar functions pattern
105
+ */
106
+ declare function generateTextMateFunctionsPattern(): string;
107
+ /**
108
+ * Generate Monaco language configuration
109
+ */
110
+ declare function generateMonacoLanguageConfig(): {
111
+ keywords: string[];
112
+ builtinFunctions: string[];
113
+ operators: string[];
114
+ symbols: RegExp;
115
+ escapes: RegExp;
116
+ tokenizer: {
117
+ root: ((string | RegExp)[] | (RegExp | {
118
+ cases: {
119
+ "@keywords": string;
120
+ "@builtinFunctions": string;
121
+ "@default": string;
122
+ };
123
+ })[] | (RegExp | {
124
+ cases: {
125
+ "@operators": string;
126
+ "@default": string;
127
+ };
128
+ })[])[];
129
+ comment: (string | RegExp)[][];
130
+ string_double: (string | RegExp)[][];
131
+ string_single: (string | RegExp)[][];
132
+ };
133
+ };
134
+ /**
135
+ * Generate hover documentation map for VSCode
136
+ */
137
+ declare function generateHoverDocs(): {
138
+ keywordDocs: Record<string, DocEntry>;
139
+ functionDocs: Record<string, DocEntry>;
140
+ };
141
+
142
+ export { type DocEntry, FUNCTIONS, type FunctionDef, KEYWORDS, type KeywordDef, type LanguageDefinition, MORPHQL_LANGUAGE, OPERATORS, type OperatorDef, generateHoverDocs, generateMonacoLanguageConfig, generateTextMateFunctionsPattern, generateTextMateKeywordsPattern, getFunctionDoc, getFunctionNames, getKeywordDoc, getKeywordNames, getKeywordsByCategory, getMultiCharOperators, getOperatorSymbols, getOperatorsByCategory, getSingleCharOperators };