@pro-fa/expreszo
Advanced tools
| export {} |
| #!/usr/bin/env node | ||
| var __defProp = Object.defineProperty; | ||
| var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
| import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; | ||
| import { c as createMcpServer } from "../chunks/server-IIpEn_4l.mjs"; | ||
| async function main() { | ||
| const server = createMcpServer(); | ||
| const transport = new StdioServerTransport(); | ||
| const shutdown = /* @__PURE__ */ __name(async () => { | ||
| try { | ||
| await server.close(); | ||
| } finally { | ||
| process.exit(0); | ||
| } | ||
| }, "shutdown"); | ||
| process.on("SIGINT", shutdown); | ||
| process.on("SIGTERM", shutdown); | ||
| await server.connect(transport); | ||
| } | ||
| __name(main, "main"); | ||
| main().catch((err) => { | ||
| console.error("[expreszo-mcp] fatal:", err); | ||
| process.exit(1); | ||
| }); |
Sorry, the diff of this file is too big to display
| var __defProp = Object.defineProperty; | ||
| var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
| import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; | ||
| import { createLanguageService } from "../language-service.mjs"; | ||
| import { z } from "zod"; | ||
| const _FullTextDocument = class _FullTextDocument { | ||
| constructor(uri, languageId, version, content) { | ||
| this._uri = uri; | ||
| this._languageId = languageId; | ||
| this._version = version; | ||
| this._content = content; | ||
| this._lineOffsets = void 0; | ||
| } | ||
| get uri() { | ||
| return this._uri; | ||
| } | ||
| get languageId() { | ||
| return this._languageId; | ||
| } | ||
| get version() { | ||
| return this._version; | ||
| } | ||
| getText(range) { | ||
| if (range) { | ||
| const start = this.offsetAt(range.start); | ||
| const end = this.offsetAt(range.end); | ||
| return this._content.substring(start, end); | ||
| } | ||
| return this._content; | ||
| } | ||
| update(changes, version) { | ||
| for (const change of changes) { | ||
| if (_FullTextDocument.isIncremental(change)) { | ||
| const range = getWellformedRange(change.range); | ||
| const startOffset = this.offsetAt(range.start); | ||
| const endOffset = this.offsetAt(range.end); | ||
| this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length); | ||
| const startLine = Math.max(range.start.line, 0); | ||
| const endLine = Math.max(range.end.line, 0); | ||
| let lineOffsets = this._lineOffsets; | ||
| const addedLineOffsets = computeLineOffsets(change.text, false, startOffset); | ||
| if (endLine - startLine === addedLineOffsets.length) { | ||
| for (let i = 0, len = addedLineOffsets.length; i < len; i++) { | ||
| lineOffsets[i + startLine + 1] = addedLineOffsets[i]; | ||
| } | ||
| } else { | ||
| if (addedLineOffsets.length < 1e4) { | ||
| lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets); | ||
| } else { | ||
| this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1)); | ||
| } | ||
| } | ||
| const diff = change.text.length - (endOffset - startOffset); | ||
| if (diff !== 0) { | ||
| for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) { | ||
| lineOffsets[i] = lineOffsets[i] + diff; | ||
| } | ||
| } | ||
| } else if (_FullTextDocument.isFull(change)) { | ||
| this._content = change.text; | ||
| this._lineOffsets = void 0; | ||
| } else { | ||
| throw new Error("Unknown change event received"); | ||
| } | ||
| } | ||
| this._version = version; | ||
| } | ||
| getLineOffsets() { | ||
| if (this._lineOffsets === void 0) { | ||
| this._lineOffsets = computeLineOffsets(this._content, true); | ||
| } | ||
| return this._lineOffsets; | ||
| } | ||
| positionAt(offset) { | ||
| offset = Math.max(Math.min(offset, this._content.length), 0); | ||
| const lineOffsets = this.getLineOffsets(); | ||
| let low = 0, high = lineOffsets.length; | ||
| if (high === 0) { | ||
| return { line: 0, character: offset }; | ||
| } | ||
| while (low < high) { | ||
| const mid = Math.floor((low + high) / 2); | ||
| if (lineOffsets[mid] > offset) { | ||
| high = mid; | ||
| } else { | ||
| low = mid + 1; | ||
| } | ||
| } | ||
| const line = low - 1; | ||
| offset = this.ensureBeforeEOL(offset, lineOffsets[line]); | ||
| return { line, character: offset - lineOffsets[line] }; | ||
| } | ||
| offsetAt(position) { | ||
| const lineOffsets = this.getLineOffsets(); | ||
| if (position.line >= lineOffsets.length) { | ||
| return this._content.length; | ||
| } else if (position.line < 0) { | ||
| return 0; | ||
| } | ||
| const lineOffset = lineOffsets[position.line]; | ||
| if (position.character <= 0) { | ||
| return lineOffset; | ||
| } | ||
| const nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length; | ||
| const offset = Math.min(lineOffset + position.character, nextLineOffset); | ||
| return this.ensureBeforeEOL(offset, lineOffset); | ||
| } | ||
| ensureBeforeEOL(offset, lineOffset) { | ||
| while (offset > lineOffset && isEOL(this._content.charCodeAt(offset - 1))) { | ||
| offset--; | ||
| } | ||
| return offset; | ||
| } | ||
| get lineCount() { | ||
| return this.getLineOffsets().length; | ||
| } | ||
| static isIncremental(event) { | ||
| const candidate = event; | ||
| return candidate !== void 0 && candidate !== null && typeof candidate.text === "string" && candidate.range !== void 0 && (candidate.rangeLength === void 0 || typeof candidate.rangeLength === "number"); | ||
| } | ||
| static isFull(event) { | ||
| const candidate = event; | ||
| return candidate !== void 0 && candidate !== null && typeof candidate.text === "string" && candidate.range === void 0 && candidate.rangeLength === void 0; | ||
| } | ||
| }; | ||
| __name(_FullTextDocument, "FullTextDocument"); | ||
| let FullTextDocument = _FullTextDocument; | ||
| var TextDocument; | ||
| (function(TextDocument2) { | ||
| function create(uri, languageId, version, content) { | ||
| return new FullTextDocument(uri, languageId, version, content); | ||
| } | ||
| __name(create, "create"); | ||
| TextDocument2.create = create; | ||
| function update(document, changes, version) { | ||
| if (document instanceof FullTextDocument) { | ||
| document.update(changes, version); | ||
| return document; | ||
| } else { | ||
| throw new Error("TextDocument.update: document must be created by TextDocument.create"); | ||
| } | ||
| } | ||
| __name(update, "update"); | ||
| TextDocument2.update = update; | ||
| function applyEdits(document, edits) { | ||
| const text = document.getText(); | ||
| const sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => { | ||
| const diff = a.range.start.line - b.range.start.line; | ||
| if (diff === 0) { | ||
| return a.range.start.character - b.range.start.character; | ||
| } | ||
| return diff; | ||
| }); | ||
| let lastModifiedOffset = 0; | ||
| const spans = []; | ||
| for (const e of sortedEdits) { | ||
| const startOffset = document.offsetAt(e.range.start); | ||
| if (startOffset < lastModifiedOffset) { | ||
| throw new Error("Overlapping edit"); | ||
| } else if (startOffset > lastModifiedOffset) { | ||
| spans.push(text.substring(lastModifiedOffset, startOffset)); | ||
| } | ||
| if (e.newText.length) { | ||
| spans.push(e.newText); | ||
| } | ||
| lastModifiedOffset = document.offsetAt(e.range.end); | ||
| } | ||
| spans.push(text.substr(lastModifiedOffset)); | ||
| return spans.join(""); | ||
| } | ||
| __name(applyEdits, "applyEdits"); | ||
| TextDocument2.applyEdits = applyEdits; | ||
| })(TextDocument || (TextDocument = {})); | ||
| function mergeSort(data, compare) { | ||
| if (data.length <= 1) { | ||
| return data; | ||
| } | ||
| const p = data.length / 2 | 0; | ||
| const left = data.slice(0, p); | ||
| const right = data.slice(p); | ||
| mergeSort(left, compare); | ||
| mergeSort(right, compare); | ||
| let leftIdx = 0; | ||
| let rightIdx = 0; | ||
| let i = 0; | ||
| while (leftIdx < left.length && rightIdx < right.length) { | ||
| const ret = compare(left[leftIdx], right[rightIdx]); | ||
| if (ret <= 0) { | ||
| data[i++] = left[leftIdx++]; | ||
| } else { | ||
| data[i++] = right[rightIdx++]; | ||
| } | ||
| } | ||
| while (leftIdx < left.length) { | ||
| data[i++] = left[leftIdx++]; | ||
| } | ||
| while (rightIdx < right.length) { | ||
| data[i++] = right[rightIdx++]; | ||
| } | ||
| return data; | ||
| } | ||
| __name(mergeSort, "mergeSort"); | ||
| function computeLineOffsets(text, isAtLineStart, textOffset = 0) { | ||
| const result = isAtLineStart ? [textOffset] : []; | ||
| for (let i = 0; i < text.length; i++) { | ||
| const ch = text.charCodeAt(i); | ||
| if (isEOL(ch)) { | ||
| if (ch === 13 && i + 1 < text.length && text.charCodeAt(i + 1) === 10) { | ||
| i++; | ||
| } | ||
| result.push(textOffset + i + 1); | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| __name(computeLineOffsets, "computeLineOffsets"); | ||
| function isEOL(char) { | ||
| return char === 13 || char === 10; | ||
| } | ||
| __name(isEOL, "isEOL"); | ||
| function getWellformedRange(range) { | ||
| const start = range.start; | ||
| const end = range.end; | ||
| if (start.line > end.line || start.line === end.line && start.character > end.character) { | ||
| return { start: end, end: start }; | ||
| } | ||
| return range; | ||
| } | ||
| __name(getWellformedRange, "getWellformedRange"); | ||
| function getWellformedEdit(textEdit) { | ||
| const range = getWellformedRange(textEdit.range); | ||
| if (range !== textEdit.range) { | ||
| return { newText: textEdit.newText, range }; | ||
| } | ||
| return textEdit; | ||
| } | ||
| __name(getWellformedEdit, "getWellformedEdit"); | ||
| function resolvePosition(doc, input) { | ||
| if ("offset" in input) { | ||
| return doc.positionAt(input.offset); | ||
| } | ||
| return { line: input.line, character: input.character }; | ||
| } | ||
| __name(resolvePosition, "resolvePosition"); | ||
| const DEFAULT_URI = "expreszo://inline"; | ||
| const positionSchema = z.union([ | ||
| z.object({ offset: z.number().int().min(0) }).strict(), | ||
| z.object({ | ||
| line: z.number().int().min(0), | ||
| character: z.number().int().min(0) | ||
| }).strict() | ||
| ]); | ||
| const variablesSchema = z.record(z.string(), z.unknown()); | ||
| const rangeSchema = z.object({ | ||
| start: z.object({ | ||
| line: z.number().int().min(0), | ||
| character: z.number().int().min(0) | ||
| }).strict(), | ||
| end: z.object({ | ||
| line: z.number().int().min(0), | ||
| character: z.number().int().min(0) | ||
| }).strict() | ||
| }).strict(); | ||
| const diagnosticSchema = z.object({ | ||
| range: rangeSchema, | ||
| severity: z.number().int().optional(), | ||
| message: z.string(), | ||
| code: z.union([z.string(), z.number()]).optional(), | ||
| source: z.string().optional() | ||
| }).passthrough(); | ||
| const baseShape = { | ||
| expression: z.string().min(1).describe("The expreszo expression source text."), | ||
| uri: z.string().optional().describe('Optional document URI. Defaults to "expreszo://inline".') | ||
| }; | ||
| const positionFieldShape = { | ||
| position: positionSchema.describe( | ||
| "Cursor position. Either { offset } (0-based index into expression) or { line, character } (LSP style, both 0-based)." | ||
| ) | ||
| }; | ||
| const variablesFieldShape = { | ||
| variables: variablesSchema.optional().describe("Optional map of variable names to runtime values, used to include them in completions/hover.") | ||
| }; | ||
| function jsonResult(value) { | ||
| return { | ||
| content: [ | ||
| { | ||
| type: "text", | ||
| text: JSON.stringify(value, null, 2) | ||
| } | ||
| ] | ||
| }; | ||
| } | ||
| __name(jsonResult, "jsonResult"); | ||
| function errorResult(err) { | ||
| const message = err instanceof Error ? err.message : String(err); | ||
| return { | ||
| isError: true, | ||
| content: [ | ||
| { | ||
| type: "text", | ||
| text: message | ||
| } | ||
| ] | ||
| }; | ||
| } | ||
| __name(errorResult, "errorResult"); | ||
| function buildDocument(expression, uri) { | ||
| return TextDocument.create(uri ?? DEFAULT_URI, "plaintext", 1, expression); | ||
| } | ||
| __name(buildDocument, "buildDocument"); | ||
| function registerTools(server, ls) { | ||
| server.registerTool( | ||
| "expreszo_get_completions", | ||
| { | ||
| title: "Expreszo: get completions", | ||
| description: "Returns LSP-style completion items (functions, constants, keywords, provided variables) for an expreszo expression at the given cursor position.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| ...positionFieldShape, | ||
| ...variablesFieldShape | ||
| } | ||
| }, | ||
| async ({ expression, uri, position, variables }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getCompletions({ | ||
| textDocument: doc, | ||
| position: resolvePosition(doc, position), | ||
| variables | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_hover", | ||
| { | ||
| title: "Expreszo: get hover", | ||
| description: "Returns hover information (signature, documentation) for the identifier at the given cursor position in an expreszo expression.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| ...positionFieldShape, | ||
| ...variablesFieldShape | ||
| } | ||
| }, | ||
| async ({ expression, uri, position, variables }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getHover({ | ||
| textDocument: doc, | ||
| position: resolvePosition(doc, position), | ||
| variables | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_highlighting", | ||
| { | ||
| title: "Expreszo: get syntax highlighting", | ||
| description: "Returns an array of syntax highlighting tokens (numbers, strings, names, keywords, operators, functions, punctuation, constants) for an expreszo expression.", | ||
| inputSchema: { | ||
| ...baseShape | ||
| } | ||
| }, | ||
| async ({ expression, uri }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getHighlighting(doc); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_diagnostics", | ||
| { | ||
| title: "Expreszo: get diagnostics", | ||
| description: "Returns diagnostics (parse errors, invalid function arity, unknown identifiers) for an expreszo expression as LSP Diagnostic objects. Passing `variables` enables the unknown-identifier check.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| ...variablesFieldShape | ||
| } | ||
| }, | ||
| async ({ expression, uri, variables }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getDiagnostics({ | ||
| textDocument: doc, | ||
| variables | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_document_symbols", | ||
| { | ||
| title: "Expreszo: get document symbols", | ||
| description: "Returns LSP DocumentSymbol entries for every unique identifier, function call, and member chain used in the expression.", | ||
| inputSchema: { | ||
| ...baseShape | ||
| } | ||
| }, | ||
| async ({ expression, uri }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getDocumentSymbols({ textDocument: doc }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_folding_ranges", | ||
| { | ||
| title: "Expreszo: get folding ranges", | ||
| description: "Returns LSP FoldingRange entries for multi-line case blocks, array literals, and object literals.", | ||
| inputSchema: { | ||
| ...baseShape | ||
| } | ||
| }, | ||
| async ({ expression, uri }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getFoldingRanges({ textDocument: doc }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_definition", | ||
| { | ||
| title: "Expreszo: get definition", | ||
| description: "Returns the LSP Location of the definition of the identifier at the given position (first occurrence within the expression), or null if the position is not on a named symbol.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| ...positionFieldShape | ||
| } | ||
| }, | ||
| async ({ expression, uri, position }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getDefinition({ | ||
| textDocument: doc, | ||
| position: resolvePosition(doc, position) | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_references", | ||
| { | ||
| title: "Expreszo: get references", | ||
| description: "Returns every LSP Location where the identifier at the given position is referenced in the expression, including the definition itself.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| ...positionFieldShape | ||
| } | ||
| }, | ||
| async ({ expression, uri, position }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getReferences({ | ||
| textDocument: doc, | ||
| position: resolvePosition(doc, position) | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_signature_help", | ||
| { | ||
| title: "Expreszo: get signature help", | ||
| description: "Returns LSP SignatureHelp for the function call enclosing the given cursor position, including the active parameter index. Returns null when the cursor is not inside a recognized call.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| ...positionFieldShape | ||
| } | ||
| }, | ||
| async ({ expression, uri, position }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getSignatureHelp({ | ||
| textDocument: doc, | ||
| position: resolvePosition(doc, position) | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_code_actions", | ||
| { | ||
| title: "Expreszo: get code actions", | ||
| description: 'Returns LSP CodeAction quick fixes for the diagnostics supplied in `context.diagnostics`. Handles arity-too-few (adds placeholder arguments) and unknown-ident (Levenshtein "did you mean" replacement).', | ||
| inputSchema: { | ||
| ...baseShape, | ||
| range: rangeSchema.describe("Range the editor is requesting actions for."), | ||
| context: z.object({ | ||
| diagnostics: z.array(diagnosticSchema), | ||
| variables: variablesSchema.optional() | ||
| }).describe("LSP CodeActionContext: the diagnostics to act on and optional variables.") | ||
| } | ||
| }, | ||
| async ({ expression, uri, range, context }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getCodeActions({ | ||
| textDocument: doc, | ||
| range, | ||
| context: { | ||
| diagnostics: context.diagnostics, | ||
| variables: context.variables | ||
| } | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_semantic_tokens", | ||
| { | ||
| title: "Expreszo: get semantic tokens", | ||
| description: "Returns LSP SemanticTokens (delta-encoded 5-tuples) for the expression. Decode with the legend exported from the language service package.", | ||
| inputSchema: { | ||
| ...baseShape | ||
| } | ||
| }, | ||
| async ({ expression, uri }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getSemanticTokens({ textDocument: doc }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_format", | ||
| { | ||
| title: "Expreszo: format expression", | ||
| description: "Format an expreszo expression using the built-in pretty-printer. Returns an array with at most one whole-document TextEdit, or an empty array if the document is already formatted or fails to parse.", | ||
| inputSchema: { | ||
| ...baseShape | ||
| } | ||
| }, | ||
| async ({ expression, uri }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.format({ textDocument: doc }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_prepare_rename", | ||
| { | ||
| title: "Expreszo: prepare rename", | ||
| description: "Returns the source range of the symbol at the given position if it is renameable, or null when the cursor is on a built-in function name, constant, keyword, or any non-identifier token. Call this before expreszo_rename to confirm the operation is valid and to learn which text range will be replaced.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| ...positionFieldShape | ||
| } | ||
| }, | ||
| async ({ expression, uri, position }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.prepareRename({ | ||
| textDocument: doc, | ||
| position: resolvePosition(doc, position) | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_rename", | ||
| { | ||
| title: "Expreszo: rename symbol", | ||
| description: "Renames the identifier at the given position to `newName`, returning an LSP WorkspaceEdit that replaces every body reference AND every lambda / function-def parameter declaration site in a single edit. Returns null when the cursor is not on a renameable identifier (built-in functions and constants are rejected) or when the document fails to parse.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| ...positionFieldShape, | ||
| newName: z.string().min(1).describe("The replacement identifier. Must be non-empty; callers are responsible for ensuring it is a valid expreszo identifier.") | ||
| } | ||
| }, | ||
| async ({ expression, uri, position, newName }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.rename({ | ||
| textDocument: doc, | ||
| position: resolvePosition(doc, position), | ||
| newName | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| server.registerTool( | ||
| "expreszo_get_inlay_hints", | ||
| { | ||
| title: "Expreszo: get inlay hints", | ||
| description: "Returns LSP InlayHint entries for parameter-name labels at each argument of every built-in function call with two or more documented parameters. For example, `pow(2, 8)` yields hints `base:` before `2` and `exp:` before `8`. Single-parameter functions (sin, abs, ...) are intentionally skipped. Pass an optional `range` to limit hints to a subregion.", | ||
| inputSchema: { | ||
| ...baseShape, | ||
| range: rangeSchema.optional().describe("Optional viewport range; hints outside it are omitted. When omitted, hints for the whole expression are returned.") | ||
| } | ||
| }, | ||
| async ({ expression, uri, range }) => { | ||
| try { | ||
| const doc = buildDocument(expression, uri); | ||
| const result = ls.getInlayHints({ | ||
| textDocument: doc, | ||
| range | ||
| }); | ||
| return jsonResult(result); | ||
| } catch (err) { | ||
| return errorResult(err); | ||
| } | ||
| } | ||
| ); | ||
| } | ||
| __name(registerTools, "registerTools"); | ||
| function createMcpServer(options = {}) { | ||
| const server = new McpServer({ | ||
| name: options.name ?? "expreszo-mcp", | ||
| version: options.version ?? "0.3.0" | ||
| }); | ||
| const ls = createLanguageService({ operators: options.operators }); | ||
| registerTools(server, ls); | ||
| return server; | ||
| } | ||
| __name(createMcpServer, "createMcpServer"); | ||
| export { | ||
| createMcpServer as c | ||
| }; |
Sorry, the diff of this file is too big to display
| import { U as setVar, bv as Precedence, ad as add, ab as sub, a5 as concat, aa as mul, a9 as div, a7 as mod, N as coalesce, a6 as pow, T as arrayIndexOrProperty, L as neg, K as pos, J as fac, ae as condition, a3 as equal, a2 as notEqual, $ as lessThan, X as lessThanEqual, a1 as greaterThan, Z as greaterThanEqual, R as inOperator, Q as notInOperator, O as orOperator, S as andOperator, n as not, I as abs, H as acos, G as acosh, D as asin, C as asinh, z as atan, y as atanh, x as cbrt, w as ceil, v as cos, u as cosh, q as exp, p as expm1, o as floor, l as log10, k as log, j as log1p, i as log2, r as round, h as sign, g as sin, f as sinh, e as sqrt, d as tan, c as tanh, t as trunc, B as BUILTIN_FUNCTIONS, m as length, M as asOperator } from "./trigonometric-B2LOazPz.mjs"; | ||
| const CORE_OPERATORS = [ | ||
| { symbol: "=", kind: "infix", arity: 2, precedence: Precedence.Assignment, associativity: "right", optionName: "assignment", pure: false, impl: setVar }, | ||
| { symbol: "+", kind: "infix", arity: 2, precedence: Precedence.AddSub, associativity: "left", optionName: "add", pure: true, impl: add }, | ||
| { symbol: "-", kind: "infix", arity: 2, precedence: Precedence.AddSub, associativity: "left", optionName: "subtract", pure: true, impl: sub }, | ||
| { symbol: "|", kind: "infix", arity: 2, precedence: Precedence.AddSub, associativity: "left", optionName: "concatenate", pure: true, impl: concat }, | ||
| { symbol: "*", kind: "infix", arity: 2, precedence: Precedence.MulDiv, associativity: "left", optionName: "multiply", pure: true, impl: mul }, | ||
| { symbol: "/", kind: "infix", arity: 2, precedence: Precedence.MulDiv, associativity: "left", optionName: "divide", pure: true, impl: div }, | ||
| { symbol: "%", kind: "infix", arity: 2, precedence: Precedence.MulDiv, associativity: "left", optionName: "remainder", pure: true, impl: mod }, | ||
| { symbol: "??", kind: "infix", arity: 2, precedence: Precedence.Coalesce, associativity: "left", optionName: "coalesce", pure: true, impl: coalesce }, | ||
| { symbol: "^", kind: "infix", arity: 2, precedence: Precedence.Exponent, associativity: "right", optionName: "power", pure: true, impl: pow }, | ||
| { symbol: "[", kind: "infix", arity: 2, precedence: Precedence.Member, associativity: "left", optionName: "array", pure: true, impl: arrayIndexOrProperty }, | ||
| { symbol: "-", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "subtract", pure: true, impl: neg }, | ||
| { symbol: "+", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "add", pure: true, impl: pos }, | ||
| { symbol: "!", kind: "postfix", arity: 1, precedence: Precedence.Postfix, associativity: "left", optionName: "factorial", pure: true, impl: fac }, | ||
| { symbol: "?", kind: "ternary", arity: 3, precedence: Precedence.Ternary, associativity: "right", optionName: "conditional", pure: true, impl: condition } | ||
| ]; | ||
| const CORE_FUNCTIONS = []; | ||
| const COMPARISON_OPERATORS = [ | ||
| { symbol: "==", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: equal }, | ||
| { symbol: "!=", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: notEqual }, | ||
| { symbol: "<", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: lessThan }, | ||
| { symbol: "<=", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: lessThanEqual }, | ||
| { symbol: ">", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: greaterThan }, | ||
| { symbol: ">=", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: greaterThanEqual }, | ||
| { symbol: "in", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "in", pure: true, impl: inOperator }, | ||
| { symbol: "not in", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "in", pure: true, impl: notInOperator } | ||
| ]; | ||
| const LOGICAL_OPERATORS = [ | ||
| { symbol: "or", kind: "infix", arity: 2, precedence: Precedence.Or, associativity: "left", optionName: "logical", pure: true, impl: orOperator }, | ||
| { symbol: "||", kind: "infix", arity: 2, precedence: Precedence.Or, associativity: "left", optionName: "logical", pure: true, impl: orOperator }, | ||
| { symbol: "and", kind: "infix", arity: 2, precedence: Precedence.And, associativity: "left", optionName: "logical", pure: true, impl: andOperator }, | ||
| { symbol: "&&", kind: "infix", arity: 2, precedence: Precedence.And, associativity: "left", optionName: "logical", pure: true, impl: andOperator }, | ||
| { symbol: "not", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "logical", pure: true, impl: not } | ||
| ]; | ||
| const MATH_OPERATORS = [ | ||
| { symbol: "abs", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "abs", pure: true, impl: abs }, | ||
| { symbol: "acos", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "acos", pure: true, impl: acos }, | ||
| { symbol: "acosh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "acosh", pure: true, impl: acosh }, | ||
| { symbol: "asin", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "asin", pure: true, impl: asin }, | ||
| { symbol: "asinh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "asinh", pure: true, impl: asinh }, | ||
| { symbol: "atan", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "atan", pure: true, impl: atan }, | ||
| { symbol: "atanh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "atanh", pure: true, impl: atanh }, | ||
| { symbol: "cbrt", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "cbrt", pure: true, impl: cbrt }, | ||
| { symbol: "ceil", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "ceil", pure: true, impl: ceil }, | ||
| { symbol: "cos", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "cos", pure: true, impl: cos }, | ||
| { symbol: "cosh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "cosh", pure: true, impl: cosh }, | ||
| { symbol: "exp", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "exp", pure: true, impl: exp }, | ||
| { symbol: "expm1", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "expm1", pure: true, impl: expm1 }, | ||
| { symbol: "floor", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "floor", pure: true, impl: floor }, | ||
| { symbol: "lg", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "lg", pure: true, impl: log10 }, | ||
| { symbol: "ln", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "ln", pure: true, impl: log }, | ||
| { symbol: "log", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "log", pure: true, impl: log }, | ||
| { symbol: "log1p", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "log1p", pure: true, impl: log1p }, | ||
| { symbol: "log2", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "log2", pure: true, impl: log2 }, | ||
| { symbol: "log10", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "log10", pure: true, impl: log10 }, | ||
| { symbol: "round", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "round", pure: true, impl: round }, | ||
| { symbol: "sign", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "sign", pure: true, impl: sign }, | ||
| { symbol: "sin", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "sin", pure: true, impl: sin }, | ||
| { symbol: "sinh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "sinh", pure: true, impl: sinh }, | ||
| { symbol: "sqrt", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "sqrt", pure: true, impl: sqrt }, | ||
| { symbol: "tan", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "tan", pure: true, impl: tan }, | ||
| { symbol: "tanh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "tanh", pure: true, impl: tanh }, | ||
| { symbol: "trunc", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "trunc", pure: true, impl: trunc } | ||
| ]; | ||
| const MATH_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "math" | ||
| ); | ||
| const STRING_OPERATORS = [ | ||
| { symbol: "length", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "length", pure: true, impl: length } | ||
| ]; | ||
| const STRING_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "string" | ||
| ); | ||
| const ARRAY_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "array" | ||
| ); | ||
| const OBJECT_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "object" | ||
| ); | ||
| const TYPE_CHECK_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "type-check" | ||
| ); | ||
| const UTILITY_OPERATORS = [ | ||
| { symbol: "as", kind: "infix", arity: 2, precedence: Precedence.Coalesce, associativity: "left", optionName: "conversion", pure: true, impl: asOperator } | ||
| ]; | ||
| const UTILITY_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "utility" | ||
| ); | ||
| const coreParser = { | ||
| operators: CORE_OPERATORS, | ||
| functions: CORE_FUNCTIONS | ||
| }; | ||
| const withComparison = { | ||
| operators: COMPARISON_OPERATORS, | ||
| functions: [] | ||
| }; | ||
| const withLogical = { | ||
| operators: LOGICAL_OPERATORS, | ||
| functions: [] | ||
| }; | ||
| const withMath = { | ||
| operators: MATH_OPERATORS, | ||
| functions: MATH_FUNCTIONS | ||
| }; | ||
| const withString = { | ||
| operators: STRING_OPERATORS, | ||
| functions: STRING_FUNCTIONS | ||
| }; | ||
| const withArray = { | ||
| operators: [], | ||
| functions: ARRAY_FUNCTIONS | ||
| }; | ||
| const withObject = { | ||
| operators: [], | ||
| functions: OBJECT_FUNCTIONS | ||
| }; | ||
| const withTypeCheck = { | ||
| operators: [], | ||
| functions: TYPE_CHECK_FUNCTIONS | ||
| }; | ||
| const withUtility = { | ||
| operators: UTILITY_OPERATORS, | ||
| functions: UTILITY_FUNCTIONS | ||
| }; | ||
| const fullParser = { | ||
| operators: [ | ||
| ...CORE_OPERATORS, | ||
| ...COMPARISON_OPERATORS, | ||
| ...LOGICAL_OPERATORS, | ||
| ...MATH_OPERATORS, | ||
| ...STRING_OPERATORS, | ||
| ...UTILITY_OPERATORS | ||
| ], | ||
| functions: [ | ||
| ...CORE_FUNCTIONS, | ||
| ...MATH_FUNCTIONS, | ||
| ...STRING_FUNCTIONS, | ||
| ...ARRAY_FUNCTIONS, | ||
| ...OBJECT_FUNCTIONS, | ||
| ...TYPE_CHECK_FUNCTIONS, | ||
| ...UTILITY_FUNCTIONS | ||
| ] | ||
| }; | ||
| export { | ||
| ARRAY_FUNCTIONS as A, | ||
| COMPARISON_OPERATORS as C, | ||
| LOGICAL_OPERATORS as L, | ||
| MATH_FUNCTIONS as M, | ||
| OBJECT_FUNCTIONS as O, | ||
| STRING_FUNCTIONS as S, | ||
| TYPE_CHECK_FUNCTIONS as T, | ||
| UTILITY_FUNCTIONS as U, | ||
| withComparison as a, | ||
| withLogical as b, | ||
| coreParser as c, | ||
| withMath as d, | ||
| withObject as e, | ||
| fullParser as f, | ||
| withString as g, | ||
| withTypeCheck as h, | ||
| withUtility as i, | ||
| MATH_OPERATORS as j, | ||
| STRING_OPERATORS as k, | ||
| UTILITY_OPERATORS as l, | ||
| withArray as w | ||
| }; |
| export * from './src/entries/mcp-server' | ||
| export {} |
| import { c } from "./chunks/server-IIpEn_4l.mjs"; | ||
| export { | ||
| c as createMcpServer | ||
| }; |
| export * from '../mcp-server/index.js'; | ||
| //# sourceMappingURL=mcp-server.d.ts.map |
| {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../../src/entries/mcp-server.ts"],"names":[],"mappings":"AAKA,cAAc,wBAAwB,CAAC"} |
| export declare function range(start: number | undefined, end: number | undefined, step?: number): number[] | undefined; | ||
| export declare function chunk(a: any[] | undefined, size: number | undefined): any[][] | undefined; | ||
| export declare function union(...arrays: (any[] | undefined)[]): any[] | undefined; | ||
| export declare function intersect(...arrays: (any[] | undefined)[]): any[] | undefined; | ||
| export declare function groupBy(a: any[] | undefined, fn: Function | undefined): Record<string, any[]> | undefined; | ||
| export declare function countBy(a: any[] | undefined, fn: Function | undefined): Record<string, number> | undefined; | ||
| //# sourceMappingURL=collection.d.ts.map |
| {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../src/functions/array/collection.ts"],"names":[],"mappings":"AAWA,wBAAgB,KAAK,CACnB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,EAAE,GAAG,SAAS,CA+BtB;AAED,wBAAgB,KAAK,CACnB,CAAC,EAAE,GAAG,EAAE,GAAG,SAAS,EACpB,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,GAAG,EAAE,EAAE,GAAG,SAAS,CAqBrB;AAKD,wBAAgB,KAAK,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,SAAS,CAwBzE;AAID,wBAAgB,SAAS,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,SAAS,CAgC7E;AAED,wBAAgB,OAAO,CACrB,CAAC,EAAE,GAAG,EAAE,GAAG,SAAS,EACpB,EAAE,EAAE,QAAQ,GAAG,SAAS,GACvB,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,SAAS,CAyBnC;AAED,wBAAgB,OAAO,CACrB,CAAC,EAAE,GAAG,EAAE,GAAG,SAAS,EACpB,EAAE,EAAE,QAAQ,GAAG,SAAS,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAsBpC"} |
| export declare function mean(array: (number | undefined)[] | undefined): number | undefined; | ||
| export declare function median(array: (number | undefined)[] | undefined): number | undefined; | ||
| export declare function mostFrequent(array: any[] | undefined): any; | ||
| export declare function variance(array: (number | undefined)[] | undefined): number | undefined; | ||
| export declare function stddev(array: (number | undefined)[] | undefined): number | undefined; | ||
| export declare function percentile(array: (number | undefined)[] | undefined, p: number | undefined): number | undefined; | ||
| //# sourceMappingURL=statistics.d.ts.map |
| {"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../../../src/functions/math/statistics.ts"],"names":[],"mappings":"AAqCA,wBAAgB,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAUlF;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAWpF;AAKD,wBAAgB,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,SAAS,GAAG,GAAG,CA4B1D;AAGD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAgBtF;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMpF;AAKD,wBAAgB,UAAU,CACxB,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,EACzC,CAAC,EAAE,MAAM,GAAG,SAAS,GACpB,MAAM,GAAG,SAAS,CA+BpB"} |
| import { CodeAction } from 'vscode-languageserver-types'; | ||
| import { Parser } from '../parsing/parser'; | ||
| import { GetCodeActionsParams } from './language-service.types.js'; | ||
| export declare function getCodeActions(params: GetCodeActionsParams, parser: Parser, functionNames: Set<string>): CodeAction[]; | ||
| //# sourceMappingURL=code-actions.d.ts.map |
| {"version":3,"file":"code-actions.d.ts","sourceRoot":"","sources":["../../../src/language-service/code-actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAyHxE,wBAAgB,cAAc,CAC5B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GACzB,UAAU,EAAE,CAed"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { DocumentSymbol } from 'vscode-languageserver-types'; | ||
| import { ParseCache } from './shared/parse-cache.js'; | ||
| export declare function getDocumentSymbols(doc: TextDocument, parseCache: ParseCache): DocumentSymbol[]; | ||
| //# sourceMappingURL=document-symbols.d.ts.map |
| {"version":3,"file":"document-symbols.d.ts","sourceRoot":"","sources":["../../../src/language-service/document-symbols.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAU1D,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,GACrB,cAAc,EAAE,CAwBlB"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { FoldingRange } from 'vscode-languageserver-types'; | ||
| import { ParseCache } from './shared/parse-cache.js'; | ||
| export declare function getFoldingRanges(doc: TextDocument, parseCache: ParseCache): FoldingRange[]; | ||
| //# sourceMappingURL=folding.d.ts.map |
| {"version":3,"file":"folding.d.ts","sourceRoot":"","sources":["../../../src/language-service/folding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAI1D,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,GACrB,YAAY,EAAE,CAmBhB"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { TextEdit } from 'vscode-languageserver-types'; | ||
| import { ParseCache } from '../shared/parse-cache.js'; | ||
| import { FormatOptions } from './pretty-printer.js'; | ||
| export interface FormatParams { | ||
| textDocument: TextDocument; | ||
| options?: FormatOptions; | ||
| } | ||
| export declare function format(params: FormatParams, parseCache: ParseCache): TextEdit[]; | ||
| //# sourceMappingURL=index.d.ts.map |
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/language-service/formatter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAQD,wBAAgB,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,GAAG,QAAQ,EAAE,CAqB/E"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { Node } from '../../ast/nodes.js'; | ||
| export interface FormatOptions { | ||
| indentSize?: number; | ||
| } | ||
| export declare class PrettyPrinter { | ||
| private readonly doc; | ||
| private readonly options; | ||
| constructor(doc: TextDocument, options?: FormatOptions); | ||
| print(node: Node): string; | ||
| private spanCrossesLines; | ||
| private indent; | ||
| private visit; | ||
| private visitNumberLit; | ||
| private visitStringLit; | ||
| private visitBoolLit; | ||
| private visitNullLit; | ||
| private visitUndefinedLit; | ||
| private visitRawLit; | ||
| private visitArrayLit; | ||
| private visitObjectLit; | ||
| private visitIdent; | ||
| private visitNameRef; | ||
| private visitMember; | ||
| private visitUnary; | ||
| private visitBinary; | ||
| private visitTernary; | ||
| private visitCall; | ||
| private argForcesBreak; | ||
| private visitLambda; | ||
| private visitFunctionDef; | ||
| private visitCase; | ||
| private visitSequence; | ||
| private visitParen; | ||
| } | ||
| //# sourceMappingURL=pretty-printer.d.ts.map |
| {"version":3,"file":"pretty-printer.d.ts","sourceRoot":"","sources":["../../../../src/language-service/formatter/pretty-printer.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EACV,IAAI,EAwBL,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAgCD,qBAAa,aAAa;IAItB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAHtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;gBAG/B,GAAG,EAAE,YAAY,EAClC,OAAO,GAAE,aAAkB;IAK7B,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIzB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,KAAK;IAyBb,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,iBAAiB;IAEzB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,cAAc;IAkBtB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,YAAY;IAEpB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,SAAS;IA6BjB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,UAAU;CAGnB"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { InlayHint, Range } from 'vscode-languageserver-types'; | ||
| import { ParseCache } from './shared/parse-cache.js'; | ||
| export declare function getInlayHints(doc: TextDocument, parseCache: ParseCache, range?: Range): InlayHint[]; | ||
| //# sourceMappingURL=inlay-hints.d.ts.map |
| {"version":3,"file":"inlay-hints.d.ts","sourceRoot":"","sources":["../../../src/language-service/inlay-hints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAiB,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAInF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AA2B1D,wBAAgB,aAAa,CAC3B,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,KAAK,CAAC,EAAE,KAAK,GACZ,SAAS,EAAE,CAsCb"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { Location, Position, WorkspaceEdit } from 'vscode-languageserver-types'; | ||
| import { ParseCache } from './shared/parse-cache.js'; | ||
| export declare function getDefinition(doc: TextDocument, parseCache: ParseCache, position: Position): Location | null; | ||
| export declare function getReferences(doc: TextDocument, parseCache: ParseCache, position: Position): Location[]; | ||
| export declare function getRenameLocations(doc: TextDocument, parseCache: ParseCache, targetName: string): Location[]; | ||
| export declare function buildRenameEdit(doc: TextDocument, parseCache: ParseCache, targetName: string, newName: string): WorkspaceEdit | null; | ||
| //# sourceMappingURL=references.d.ts.map |
| {"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../src/language-service/references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAY,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AA+G1D,wBAAgB,aAAa,CAC3B,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,GAAG,IAAI,CAwBjB;AAED,wBAAgB,aAAa,CAC3B,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,GACjB,QAAQ,EAAE,CAGZ;AAOD,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,MAAM,GACjB,QAAQ,EAAE,CAmBZ;AAMD,wBAAgB,eAAe,CAC7B,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,aAAa,GAAG,IAAI,CAMtB"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { SemanticTokens } from 'vscode-languageserver-types'; | ||
| import { HighlightToken } from './language-service.types'; | ||
| export declare const SEMANTIC_TOKENS_LEGEND: { | ||
| tokenTypes: readonly ["keyword", "function", "variable", "namespace", "number", "string", "operator", "comment"]; | ||
| tokenModifiers: readonly string[]; | ||
| }; | ||
| export declare function encodeSemanticTokens(doc: TextDocument, highlightTokens: readonly HighlightToken[]): SemanticTokens; | ||
| //# sourceMappingURL=semantic-tokens.d.ts.map |
| {"version":3,"file":"semantic-tokens.d.ts","sourceRoot":"","sources":["../../../src/language-service/semantic-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAO/D,eAAO,MAAM,sBAAsB;;oBAWX,SAAS,MAAM,EAAE;CACxC,CAAC;AAgBF,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,YAAY,EACjB,eAAe,EAAE,SAAS,cAAc,EAAE,GACzC,cAAc,CA+ChB"} |
| import { Parser } from '../../parsing/parser.js'; | ||
| import { Values } from '../../types/values.js'; | ||
| export declare function buildKnownNames(parser: Parser, variables: Values | undefined): Set<string>; | ||
| //# sourceMappingURL=known-names.d.ts.map |
| {"version":3,"file":"known-names.d.ts","sourceRoot":"","sources":["../../../../src/language-service/shared/known-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAOpD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,CAS1F"} |
| export declare function levenshtein(a: string, b: string): number; | ||
| export declare function closestMatch(target: string, candidates: Iterable<string>, maxDistance?: number): { | ||
| match: string; | ||
| distance: number; | ||
| } | null; | ||
| //# sourceMappingURL=levenshtein.d.ts.map |
| {"version":3,"file":"levenshtein.d.ts","sourceRoot":"","sources":["../../../../src/language-service/shared/levenshtein.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAyBxD;AAOD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC5B,WAAW,SAAI,GACd;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAU5C"} |
| import { Node } from '../../ast/nodes.js'; | ||
| import { Expression } from '../../core/expression.js'; | ||
| export declare function findNodeAt(expression: Expression, offset: number): Node[]; | ||
| //# sourceMappingURL=node-at-position.d.ts.map |
| {"version":3,"file":"node-at-position.d.ts","sourceRoot":"","sources":["../../../../src/language-service/shared/node-at-position.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAyG3D,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,CAIzE"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { Parser } from '../../parsing/parser.js'; | ||
| import { Expression } from '../../core/expression.js'; | ||
| import { ParseError } from '../../types/errors.js'; | ||
| export interface ParseResult { | ||
| expression: Expression | null; | ||
| parseError: ParseError | Error | null; | ||
| } | ||
| export interface ParseCache { | ||
| get(doc: TextDocument): ParseResult; | ||
| } | ||
| export declare function createParseCache(parser: Parser): ParseCache; | ||
| //# sourceMappingURL=parse-cache.d.ts.map |
| {"version":3,"file":"parse-cache.d.ts","sourceRoot":"","sources":["../../../../src/language-service/shared/parse-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,GAAG,EAAE,YAAY,GAAG,WAAW,CAAC;CACrC;AAQD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CA6B3D"} |
| import { Node, Span } from '../../ast/nodes.js'; | ||
| import { Expression } from '../../core/expression.js'; | ||
| export type SymbolKind = 'function' | 'variable' | 'member'; | ||
| export interface PositionedSymbol { | ||
| name: string; | ||
| kind: SymbolKind; | ||
| span: Span; | ||
| fullPath: string; | ||
| } | ||
| export declare function getRootNode(expression: Expression): Node; | ||
| export declare function collectPositionedSymbols(expression: Expression): PositionedSymbol[]; | ||
| //# sourceMappingURL=positioned-symbols.d.ts.map |
| {"version":3,"file":"positioned-symbols.d.ts","sourceRoot":"","sources":["../../../../src/language-service/shared/positioned-symbols.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EAAE,IAAI,EAIX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IAEX,QAAQ,EAAE,MAAM,CAAC;CAClB;AA6BD,wBAAgB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAExD;AAcD,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,gBAAgB,EAAE,CA8DnF"} |
| import { Range } from 'vscode-languageserver-types'; | ||
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { Span } from '../../ast/nodes.js'; | ||
| export declare function spanToRange(doc: TextDocument, span: Span): Range; | ||
| export declare function offsetInSpan(offset: number, span: Span): boolean; | ||
| //# sourceMappingURL=positions.d.ts.map |
| {"version":3,"file":"positions.d.ts","sourceRoot":"","sources":["../../../../src/language-service/shared/positions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,CAKhE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAEhE"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { Position, SignatureHelp } from 'vscode-languageserver-types'; | ||
| import { Parser } from '../parsing/parser'; | ||
| import { TokenSpan } from './ls-utils'; | ||
| export declare function getSignatureHelp(doc: TextDocument, parser: Parser, spans: TokenSpan[], position: Position, functionNames: Set<string>): SignatureHelp | null; | ||
| //# sourceMappingURL=signature-help.d.ts.map |
| {"version":3,"file":"signature-help.d.ts","sourceRoot":"","sources":["../../../src/language-service/signature-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA2D5C,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAAE,EAClB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GACzB,aAAa,GAAG,IAAI,CAmBtB"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { Diagnostic } from 'vscode-languageserver-types'; | ||
| import { ParseCache } from './shared/parse-cache.js'; | ||
| export declare function getTypeMismatchDiagnostics(doc: TextDocument, parseCache: ParseCache): Diagnostic[]; | ||
| //# sourceMappingURL=type-check.d.ts.map |
| {"version":3,"file":"type-check.d.ts","sourceRoot":"","sources":["../../../src/language-service/type-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AA0D1D,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,GACrB,UAAU,EAAE,CAmCd"} |
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| import { Diagnostic } from 'vscode-languageserver-types'; | ||
| import { Parser } from '../parsing/parser'; | ||
| import { Values } from '../types'; | ||
| import { ParseCache } from './shared/parse-cache.js'; | ||
| export declare function getUnknownIdentDiagnostics(doc: TextDocument, parser: Parser, parseCache: ParseCache, variables: Values | undefined): Diagnostic[]; | ||
| //# sourceMappingURL=unknown-ident.d.ts.map |
| {"version":3,"file":"unknown-ident.d.ts","sourceRoot":"","sources":["../../../src/language-service/unknown-ident.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAsI1D,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,UAAU,EAAE,CAgBd"} |
| export {}; | ||
| //# sourceMappingURL=bin.d.ts.map |
| {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/bin.ts"],"names":[],"mappings":""} |
| export { createMcpServer } from './server.js'; | ||
| export type { CreateMcpServerOptions } from './server.js'; | ||
| //# sourceMappingURL=index.d.ts.map |
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC"} |
| import { Position } from 'vscode-languageserver-types'; | ||
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
| export type PositionInput = { | ||
| offset: number; | ||
| } | { | ||
| line: number; | ||
| character: number; | ||
| }; | ||
| export declare function resolvePosition(doc: TextDocument, input: PositionInput): Position; | ||
| //# sourceMappingURL=position.d.ts.map |
| {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/position.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,MAAM,MAAM,aAAa,GACrB;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,wBAAgB,eAAe,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,CAKjF"} |
| import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; | ||
| import { LanguageServiceOptions } from '../language-service/language-service.types.js'; | ||
| export interface CreateMcpServerOptions { | ||
| operators?: LanguageServiceOptions['operators']; | ||
| name?: string; | ||
| version?: string; | ||
| } | ||
| export declare function createMcpServer(options?: CreateMcpServerOptions): McpServer; | ||
| //# sourceMappingURL=server.d.ts.map |
| {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAG5F,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,sBAAsB,CAAC,WAAW,CAAC,CAAC;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,SAAS,CAU/E"} |
| import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; | ||
| import { LanguageServiceApi } from '../language-service/language-service.types.js'; | ||
| export declare function registerTools(server: McpServer, ls: LanguageServiceApi): void; | ||
| //# sourceMappingURL=tools.d.ts.map |
| {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AA+ExF,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,kBAAkB,GAAG,IAAI,CAiX7E"} |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { A, w } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { A, w } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| export { | ||
@@ -3,0 +3,0 @@ A as ARRAY_FUNCTIONS, |
@@ -1,2 +0,2 @@ | ||
| import { C, a } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { C, a } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| export { | ||
@@ -3,0 +3,0 @@ C as COMPARISON_OPERATORS, |
+5
-5
| var __defProp = Object.defineProperty; | ||
| var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
| import { P as Parser } from "./chunks/parser-B0a0K6nS.mjs"; | ||
| import { B, E } from "./chunks/parser-B0a0K6nS.mjs"; | ||
| import { c } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { A, a, E as E2, b, F, P, bh, V } from "./chunks/trigonometric-CxWNSU_B.mjs"; | ||
| import { P as Parser } from "./chunks/parser-Bgob3tCB.mjs"; | ||
| import { B, E } from "./chunks/parser-Bgob3tCB.mjs"; | ||
| import { c } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| import { A, a, E as E2, b, F, P, bv, V } from "./chunks/trigonometric-B2LOazPz.mjs"; | ||
| function defineParser(config) { | ||
@@ -55,3 +55,3 @@ var _a, _b; | ||
| Parser, | ||
| bh as Precedence, | ||
| bv as Precedence, | ||
| V as VariableError, | ||
@@ -58,0 +58,0 @@ c as coreParser, |
+3
-3
@@ -1,5 +0,5 @@ | ||
| import { E, P } from "./chunks/parser-B0a0K6nS.mjs"; | ||
| import { A, a, E as E2, b, F, P as P2, V, s } from "./chunks/trigonometric-CxWNSU_B.mjs"; | ||
| import { E, P } from "./chunks/parser-Bgob3tCB.mjs"; | ||
| import { A, a, E as E2, b, F, P as P2, V, s } from "./chunks/trigonometric-B2LOazPz.mjs"; | ||
| import { defineParser } from "./core.mjs"; | ||
| import { c, f, w, a as a2, b as b2, d, e, g, h, i } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { c, f, w, a as a2, b as b2, d, e, g, h, i } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| import { createLanguageService } from "./language-service.mjs"; | ||
@@ -6,0 +6,0 @@ export { |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { L, b } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { L, b } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| export { | ||
@@ -3,0 +3,0 @@ L as LOGICAL_OPERATORS, |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { M, j, d } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { M, j, d } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| export { | ||
@@ -3,0 +3,0 @@ M as MATH_FUNCTIONS, |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { O, e } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { O, e } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| export { | ||
@@ -3,0 +3,0 @@ O as OBJECT_FUNCTIONS, |
| export * from './operations'; | ||
| export * from './collection.js'; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/array/index.ts"],"names":[],"mappings":"AAKA,cAAc,cAAc,CAAC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/array/index.ts"],"names":[],"mappings":"AAKA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"} |
| export * from './advanced.js'; | ||
| export * from './statistics.js'; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/math/index.ts"],"names":[],"mappings":"AAKA,cAAc,eAAe,CAAC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/math/index.ts"],"names":[],"mappings":"AAKA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"} |
@@ -6,3 +6,5 @@ import { Value, ValueObject } from '../../types/values.js'; | ||
| export declare function flatten(obj: ValueObject | undefined, separator?: string): ValueObject | undefined; | ||
| export declare function pick(obj: ValueObject | undefined, keyList: Value[] | string | undefined): ValueObject | undefined; | ||
| export declare function omit(obj: ValueObject | undefined, keyList: Value[] | string | undefined): ValueObject | undefined; | ||
| export declare function mapValues(obj: any, fn: any): ValueObject | undefined; | ||
| //# sourceMappingURL=operations.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/functions/object/operations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAe,MAAM,uBAAuB,CAAC;AAQxE,wBAAgB,KAAK,CAAC,GAAG,OAAO,EAAE,CAAC,WAAW,GAAG,SAAS,CAAC,EAAE,GAAG,WAAW,GAAG,SAAS,CAetF;AAOD,wBAAgB,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAQvE;AAOD,wBAAgB,MAAM,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,GAAG,KAAK,EAAE,GAAG,SAAS,CAQxE;AASD,wBAAgB,OAAO,CACrB,GAAG,EAAE,WAAW,GAAG,SAAS,EAC5B,SAAS,GAAE,MAAY,GACtB,WAAW,GAAG,SAAS,CA+BzB;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,GAAG,WAAW,GAAG,SAAS,CAapE"} | ||
| {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/functions/object/operations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAe,MAAM,uBAAuB,CAAC;AAQxE,wBAAgB,KAAK,CAAC,GAAG,OAAO,EAAE,CAAC,WAAW,GAAG,SAAS,CAAC,EAAE,GAAG,WAAW,GAAG,SAAS,CAetF;AAOD,wBAAgB,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAQvE;AAOD,wBAAgB,MAAM,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,GAAG,KAAK,EAAE,GAAG,SAAS,CAQxE;AASD,wBAAgB,OAAO,CACrB,GAAG,EAAE,WAAW,GAAG,SAAS,EAC5B,SAAS,GAAE,MAAY,GACtB,WAAW,GAAG,SAAS,CA+BzB;AAQD,wBAAgB,IAAI,CAClB,GAAG,EAAE,WAAW,GAAG,SAAS,EAC5B,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,GAAG,SAAS,GACpC,WAAW,GAAG,SAAS,CA+BzB;AAQD,wBAAgB,IAAI,CAClB,GAAG,EAAE,WAAW,GAAG,SAAS,EAC5B,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,GAAG,SAAS,GACpC,WAAW,GAAG,SAAS,CAkCzB;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,GAAG,WAAW,GAAG,SAAS,CAapE"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/language-service/diagnostics.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAa,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA4P5C,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,SAAS,EAAE,EAClB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,EAC1B,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,GAC3C,UAAU,EAAE,CAwDd;AAOD,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,UAAU,GAChB,UAAU,CA0BZ;AAOD,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,GACX,UAAU,CAaZ"} | ||
| {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/language-service/diagnostics.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAa,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA8P5C,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,SAAS,EAAE,EAClB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,EAC1B,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,GAC3C,UAAU,EAAE,CAwDd;AAOD,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,UAAU,GAChB,UAAU,CA0BZ;AAOD,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,GACX,UAAU,CAaZ"} |
| export * from './language-service.types.js'; | ||
| export * from './language-service.js'; | ||
| export { SEMANTIC_TOKENS_LEGEND } from './semantic-tokens.js'; | ||
| export type { InlayHint } from 'vscode-languageserver-types'; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/language-service/index.ts"],"names":[],"mappings":"AAKA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/language-service/index.ts"],"names":[],"mappings":"AAKA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"language-service.d.ts","sourceRoot":"","sources":["../../../src/language-service/language-service.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAEV,sBAAsB,EAItB,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAqBlC,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAAsB,GAAG,SAAqB,GAAG,kBAAkB,CA6TjH"} | ||
| {"version":3,"file":"language-service.d.ts","sourceRoot":"","sources":["../../../src/language-service/language-service.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAEV,sBAAsB,EAStB,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAmDlC,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,sBAAsB,GAAG,SAAqB,GAAG,kBAAkB,CAsbjH"} |
| import { Parser } from '../parsing/parser'; | ||
| import { FunctionParamDoc } from '../registry/function-descriptor.js'; | ||
| import { ArityInfo } from './language-service.types'; | ||
| import { SignatureInformation } from 'vscode-languageserver-types'; | ||
| export declare class FunctionDetails { | ||
@@ -8,3 +10,3 @@ private readonly parser; | ||
| constructor(parser: Parser, name: string); | ||
| private params; | ||
| params(): readonly FunctionParamDoc[]; | ||
| private arity; | ||
@@ -15,3 +17,4 @@ arityInfo(): ArityInfo | undefined; | ||
| completionText(): string; | ||
| signatureInformation(): SignatureInformation; | ||
| } | ||
| //# sourceMappingURL=language-service.models.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"language-service.models.d.ts","sourceRoot":"","sources":["../../../src/language-service/language-service.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,qBAAa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,MAAM;aAA0B,IAAI,EAAE,MAAM;IAFzE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;gBAEvB,MAAM,EAAE,MAAM,EAAkB,IAAI,EAAE,MAAM;IAIzE,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,KAAK;IAWN,SAAS,IAAI,SAAS,GAAG,SAAS;IAsBlC,IAAI,IAAI,MAAM,GAAG,SAAS;IAc1B,OAAO,IAAI,MAAM;IAYjB,cAAc,IAAI,MAAM;CAWhC"} | ||
| {"version":3,"file":"language-service.models.d.ts","sourceRoot":"","sources":["../../../src/language-service/language-service.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,EAAgB,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAwB,MAAM,6BAA6B,CAAC;AAG9F,qBAAa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,MAAM;aAA0B,IAAI,EAAE,MAAM;IAFzE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;gBAEvB,MAAM,EAAE,MAAM,EAAkB,IAAI,EAAE,MAAM;IAIlE,MAAM,IAAI,SAAS,gBAAgB,EAAE;IAI5C,OAAO,CAAC,KAAK;IAWN,SAAS,IAAI,SAAS,GAAG,SAAS;IAsBlC,IAAI,IAAI,MAAM,GAAG,SAAS;IAkB1B,OAAO,IAAI,MAAM;IAYjB,cAAc,IAAI,MAAM;IAgBxB,oBAAoB,IAAI,oBAAoB;CAiCpD"} |
| import { Values } from '../types'; | ||
| import { Position, Hover, CompletionItem, MarkupContent, Diagnostic } from 'vscode-languageserver-types'; | ||
| import { Position, Hover, CompletionItem, MarkupContent, Diagnostic, DocumentSymbol, FoldingRange, Location, SignatureHelp, SemanticTokens, CodeAction, Range, TextEdit, WorkspaceEdit, InlayHint } from 'vscode-languageserver-types'; | ||
| import { FormatOptions } from './formatter/pretty-printer'; | ||
| import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
@@ -9,5 +10,56 @@ export interface LanguageServiceApi { | ||
| getDiagnostics(params: GetDiagnosticsParams): Diagnostic[]; | ||
| getDocumentSymbols(params: { | ||
| textDocument: TextDocument; | ||
| }): DocumentSymbol[]; | ||
| getFoldingRanges(params: { | ||
| textDocument: TextDocument; | ||
| }): FoldingRange[]; | ||
| getDefinition(params: { | ||
| textDocument: TextDocument; | ||
| position: Position; | ||
| }): Location | null; | ||
| getReferences(params: { | ||
| textDocument: TextDocument; | ||
| position: Position; | ||
| }): Location[]; | ||
| getSignatureHelp(params: { | ||
| textDocument: TextDocument; | ||
| position: Position; | ||
| }): SignatureHelp | null; | ||
| getSemanticTokens(params: { | ||
| textDocument: TextDocument; | ||
| }): SemanticTokens; | ||
| getCodeActions(params: GetCodeActionsParams): CodeAction[]; | ||
| format(params: FormatParams): TextEdit[]; | ||
| prepareRename(params: PrepareRenameParams): Range | null; | ||
| rename(params: RenameParams): WorkspaceEdit | null; | ||
| getInlayHints(params: GetInlayHintsParams): InlayHint[]; | ||
| } | ||
| export interface FormatParams { | ||
| textDocument: TextDocument; | ||
| options?: FormatOptions; | ||
| } | ||
| export interface PrepareRenameParams { | ||
| textDocument: TextDocument; | ||
| position: Position; | ||
| } | ||
| export interface RenameParams { | ||
| textDocument: TextDocument; | ||
| position: Position; | ||
| newName: string; | ||
| } | ||
| export interface GetInlayHintsParams { | ||
| textDocument: TextDocument; | ||
| range?: Range; | ||
| } | ||
| export interface GetCodeActionsParams { | ||
| textDocument: TextDocument; | ||
| range: Range; | ||
| context: { | ||
| diagnostics: readonly Diagnostic[]; | ||
| variables?: Values; | ||
| }; | ||
| } | ||
| export interface HighlightToken { | ||
| type: 'number' | 'string' | 'name' | 'keyword' | 'operator' | 'function' | 'punctuation' | 'constant'; | ||
| type: 'number' | 'string' | 'name' | 'keyword' | 'operator' | 'function' | 'punctuation' | 'constant' | 'comment'; | ||
| start: number; | ||
@@ -35,2 +87,3 @@ end: number; | ||
| textDocument: TextDocument; | ||
| variables?: Values; | ||
| } | ||
@@ -37,0 +90,0 @@ export interface ArityInfo { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"language-service.types.d.ts","sourceRoot":"","sources":["../../../src/language-service/language-service.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAKvE,MAAM,WAAW,kBAAkB;IAK/B,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,EAAE,CAAC;IAM/D,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC;IAM1C,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,EAAE,CAAC;IAO9D,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,EAAE,CAAC;CAC9D;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,CAAC;IACtG,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,WAAW,sBAAsB;IAGnC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,OAAQ,SAAQ,KAAK;IAClC,QAAQ,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,YAAY,CAAC;CAC9B;AAKD,MAAM,WAAW,SAAS;IAEtB,GAAG,EAAE,MAAM,CAAC;IAEZ,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B"} | ||
| {"version":3,"file":"language-service.types.d.ts","sourceRoot":"","sources":["../../../src/language-service/language-service.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EACV,QAAQ,EACR,KAAK,EACL,cAAc,EACd,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,UAAU,EACV,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAKvE,MAAM,WAAW,kBAAkB;IAK/B,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,EAAE,CAAC;IAM/D,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC;IAM1C,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,EAAE,CAAC;IAO9D,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,EAAE,CAAC;IAM3D,kBAAkB,CAAC,MAAM,EAAE;QAAE,YAAY,EAAE,YAAY,CAAA;KAAE,GAAG,cAAc,EAAE,CAAC;IAM7E,gBA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from '../types'; | ||
| export declare function iterateTokens(ts: TokenStream, untilPos?: number): TokenSpan[]; | ||
| export interface CommentSpan { | ||
| start: number; | ||
| end: number; | ||
| } | ||
| export declare function findCommentSpans(text: string): CommentSpan[]; | ||
| //# sourceMappingURL=ls-utils.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"ls-utils.d.ts","sourceRoot":"","sources":["../../../src/language-service/ls-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAQ,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAiBtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAclD;AAmBD,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAI9C;AAuBD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAOnG;AAuBD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,SAAI,EAAE,QAAQ,SAAK,GAAG,MAAM,CAiBzF;AAeD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAEzE;AAKD,MAAM,WAAW,SAAS;IAExB,KAAK,EAAE,KAAK,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,CAAC;CACb;AAwBD,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAgB7E"} | ||
| {"version":3,"file":"ls-utils.d.ts","sourceRoot":"","sources":["../../../src/language-service/ls-utils.ts"],"names":[],"mappings":"AAAA,O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I,EAAE,GACZ,OAAO,GAAG,SAAS,CAuDrB;AASD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,EAAE,CA6DxH"} |
| import { Expression } from '../core/expression.js'; | ||
| import { Value, VariableResolver, Values } from '../types/values.js'; | ||
| import { Value, ValueObject, VariableResolver, Values } from '../types/values.js'; | ||
| import { OperatorFunction } from '../types/parser.js'; | ||
@@ -24,2 +24,5 @@ import { DeprecationHandler } from '../utils/deprecation.js'; | ||
| evaluate(expr: string, variables?: Values, resolver?: VariableResolver): Value | Promise<Value>; | ||
| evaluateObject<T extends ValueObject = ValueObject>(object: ValueObject, variables?: Values, resolver?: VariableResolver): T; | ||
| evaluateArray<T = Value>(array: readonly Value[], variables?: Values, resolver?: VariableResolver): T[]; | ||
| private resolveValue; | ||
| static setDeprecationHandler(handler: DeprecationHandler | undefined): void; | ||
@@ -26,0 +29,0 @@ private static readonly optionNameMap; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/parsing/parser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAyB,gBAAgB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAoElE,UAAU,aAAa;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,MAAM;IACV,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,OA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AE,gBAAgB,GAC1B,CAAC,EAAE;IAaN,OAAO,CAAC,YAAY;IAyCpB,MAAM,CAAC,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IAI3E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CA4B1B;IAEX,OAAO,CAAC,MAAM,CAAC,aAAa;IAgB5B,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;CAMvC"} |
@@ -30,2 +30,5 @@ import { Node } from '../ast/nodes.js'; | ||
| private atEnd; | ||
| private peekStart; | ||
| private peekEnd; | ||
| private prevEnd; | ||
| private check; | ||
@@ -32,0 +35,0 @@ private accept; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"pratt.d.ts","sourceRoot":"","sources":["../../../src/parsing/pratt.ts"],"names":[],"mappings":"AAiCA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAQ3D,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,OAAO,EAAE;QACP,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAChC,CAAC,GAAG,EAAE,MAA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xB,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,iBAAiB;IA+BzB,OAAO,CAAC,qBAAqB;IAiC7B,OAAO,CAAC,SAAS;IAsHjB,OAAO,CAAC,+BAA+B;IAgBvC,OAAO,CAAC,qBAAqB;IA8D7B,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,kBAAkB;CAqD3B;AAGD,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAEnE"} |
@@ -23,2 +23,3 @@ import { OperatorFunction } from '../types/parser.js'; | ||
| readonly tokens: readonly Token[]; | ||
| readonly ends: readonly number[]; | ||
| readonly index: number; | ||
@@ -28,5 +29,8 @@ readonly expression: string; | ||
| static from(parser: ParserLike, expression: string): TokenCursor; | ||
| peekEnd(): number; | ||
| peekEndAt(offset: number): number; | ||
| peek(): Token; | ||
| peekAt(offset: number): Token; | ||
| advance(): TokenCursor; | ||
| previousEnd(): number; | ||
| atEnd(): boolean; | ||
@@ -33,0 +37,0 @@ check(type: TokenType, value?: string): boolean; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"token-cursor.d.ts","sourceRoot":"","sources":["../../../src/parsing/token-cursor.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAQ,SAAS,EAAE,MAAM,YAAY,CAAC;AASpD,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAA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;IAY/C,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,IAAI;IAW5E,cAAc,IAAI,sBAAsB;CAYzC"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"function-docs.d.ts","sourceRoot":"","sources":["../../../../src/registry/builtin/function-docs.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAgVxE,CAAC"} | ||
| {"version":3,"file":"function-docs.d.ts","sourceRoot":"","sources":["../../../../src/registry/builtin/function-docs.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CA4axE,CAAC"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/registry/builtin/functions.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAkGpE,eAAO,MAAM,iBAAiB,EAAE,SAAS,kBAAkB,EAK1D,CAAC;AAMF,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAE7E,CAAC"} | ||
| {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/registry/builtin/functions.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAmHpE,eAAO,MAAM,iBAAiB,EAAE,SAAS,kBAAkB,EAK1D,CAAC;AAMF,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAE7E,CAAC"} |
| import { OperatorFunction } from '../types/parser.js'; | ||
| export type FunctionCategory = 'math' | 'array' | 'string' | 'object' | 'utility' | 'type-check'; | ||
| export type ParamType = 'number' | 'string' | 'boolean' | 'array' | 'object' | 'function' | 'any'; | ||
| export interface FunctionParamDoc { | ||
@@ -8,2 +9,3 @@ readonly name: string; | ||
| readonly isVariadic?: boolean; | ||
| readonly type?: ParamType; | ||
| } | ||
@@ -10,0 +12,0 @@ export interface FunctionDocs { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"function-descriptor.d.ts","sourceRoot":"","sources":["../../../src/registry/function-descriptor.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAO3D,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,YAAY,CAAC;AAMjB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAOD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,kBAAkB;IAEjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IAOpC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAMvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAMvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAK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unks/utility-BbA8V63K.mjs"; | ||
| import { S, k, g } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| export { | ||
@@ -3,0 +3,0 @@ S as STRING_FUNCTIONS, |
@@ -1,2 +0,2 @@ | ||
| import { T, h } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { T, h } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| export { | ||
@@ -3,0 +3,0 @@ T as TYPE_CHECK_FUNCTIONS, |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { U, l, i } from "./chunks/utility-BbA8V63K.mjs"; | ||
| import { U, l, i } from "./chunks/utility-JQF0W3xn.mjs"; | ||
| export { | ||
@@ -3,0 +3,0 @@ U as UTILITY_FUNCTIONS, |
| var __defProp = Object.defineProperty; | ||
| var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
| var _a; | ||
| import { U as setVar, bh as Precedence, O as orOperator, S as andOperator, a3 as equal, a2 as notEqual, $ as lessThan, X as lessThanEqual, a1 as greaterThan, Z as greaterThanEqual, R as inOperator, Q as notInOperator, ad as add, ab as sub, a5 as concat, aa as mul, a9 as div, a7 as mod, N as coalesce, M as asOperator, a6 as pow, T as arrayIndexOrProperty, L as neg, K as pos, n as not, J as fac, I as abs, H as acos, G as acosh, D as asin, C as asinh, z as atan, y as atanh, x as cbrt, w as ceil, v as cos, u as cosh, q as exp, p as expm1, o as floor, m as length, l as log10, k as log, j as log1p, i as log2, r as round, h as sign, g as sin, f as sinh, e as sqrt, d as tan, c as tanh, t as trunc, ae as condition, bi as DANGEROUS_PROPERTIES, A as AccessError, F as FunctionError, B as BUILTIN_FUNCTIONS } from "./chunks/trigonometric-CxWNSU_B.mjs"; | ||
| import { U as setVar, bv as Precedence, O as orOperator, S as andOperator, a3 as equal, a2 as notEqual, $ as lessThan, X as lessThanEqual, a1 as greaterThan, Z as greaterThanEqual, R as inOperator, Q as notInOperator, ad as add, ab as sub, a5 as concat, aa as mul, a9 as div, a7 as mod, N as coalesce, M as asOperator, a6 as pow, T as arrayIndexOrProperty, L as neg, K as pos, n as not, J as fac, I as abs, H as acos, G as acosh, D as asin, C as asinh, z as atan, y as atanh, x as cbrt, w as ceil, v as cos, u as cosh, q as exp, p as expm1, o as floor, m as length, l as log10, k as log, j as log1p, i as log2, r as round, h as sign, g as sin, f as sinh, e as sqrt, d as tan, c as tanh, t as trunc, ae as condition, bw as DANGEROUS_PROPERTIES, A as AccessError, F as FunctionError, B as BUILTIN_FUNCTIONS } from "./chunks/trigonometric-B2LOazPz.mjs"; | ||
| const BINARY_OPERATORS = [ | ||
@@ -6,0 +6,0 @@ { symbol: "=", kind: "infix", arity: 2, precedence: Precedence.Assignment, associativity: "right", optionName: "assignment", pure: false, impl: setVar }, |
+16
-3
| { | ||
| "name": "@pro-fa/expreszo", | ||
| "version": "0.2.0", | ||
| "version": "0.3.0", | ||
| "description": "Mathematical expression evaluator", | ||
@@ -80,4 +80,11 @@ "keywords": [ | ||
| "import": "./dist/language-service.mjs" | ||
| }, | ||
| "./mcp-server": { | ||
| "types": "./dist/mcp-server.d.ts", | ||
| "import": "./dist/mcp-server.mjs" | ||
| } | ||
| }, | ||
| "bin": { | ||
| "expreszo-mcp": "dist/bin/mcp-server.mjs" | ||
| }, | ||
| "directories": { | ||
@@ -114,3 +121,5 @@ "test": "test" | ||
| "prepublish": "npm run build", | ||
| "playground": "npm run build:umd && node samples/language-service-sample/serve-sample.cjs" | ||
| "playground": "npm run build:umd && node samples/language-service-sample/serve-sample.cjs", | ||
| "mcp:dev": "tsx src/mcp-server/bin.ts", | ||
| "mcp:inspect": "npx @modelcontextprotocol/inspector tsx src/mcp-server/bin.ts" | ||
| }, | ||
@@ -155,3 +164,7 @@ "devDependencies": { | ||
| }, | ||
| "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
| "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", | ||
| "optionalDependencies": { | ||
| "@modelcontextprotocol/sdk": "^1.29.0", | ||
| "zod": "^4.3.6" | ||
| } | ||
| } |
+1
-0
@@ -119,2 +119,3 @@ # ExpresZo Typescript | ||
| | [Language Service](docs/language-service.md) | IDE integration: completions, hover info, diagnostics, Monaco Editor | | ||
| | [MCP Server](docs/mcp-server.md) | Model Context Protocol server exposing the language service to AI assistants | | ||
| | [Migration Guide](docs/migration.md) | Migrating from expr-eval, legacy mode, version history | | ||
@@ -121,0 +122,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import { U as setVar, bh as Precedence, ad as add, ab as sub, a5 as concat, aa as mul, a9 as div, a7 as mod, N as coalesce, a6 as pow, T as arrayIndexOrProperty, L as neg, K as pos, J as fac, ae as condition, a3 as equal, a2 as notEqual, $ as lessThan, X as lessThanEqual, a1 as greaterThan, Z as greaterThanEqual, R as inOperator, Q as notInOperator, O as orOperator, S as andOperator, n as not, I as abs, H as acos, G as acosh, D as asin, C as asinh, z as atan, y as atanh, x as cbrt, w as ceil, v as cos, u as cosh, q as exp, p as expm1, o as floor, l as log10, k as log, j as log1p, i as log2, r as round, h as sign, g as sin, f as sinh, e as sqrt, d as tan, c as tanh, t as trunc, B as BUILTIN_FUNCTIONS, m as length, M as asOperator } from "./trigonometric-CxWNSU_B.mjs"; | ||
| const CORE_OPERATORS = [ | ||
| { symbol: "=", kind: "infix", arity: 2, precedence: Precedence.Assignment, associativity: "right", optionName: "assignment", pure: false, impl: setVar }, | ||
| { symbol: "+", kind: "infix", arity: 2, precedence: Precedence.AddSub, associativity: "left", optionName: "add", pure: true, impl: add }, | ||
| { symbol: "-", kind: "infix", arity: 2, precedence: Precedence.AddSub, associativity: "left", optionName: "subtract", pure: true, impl: sub }, | ||
| { symbol: "|", kind: "infix", arity: 2, precedence: Precedence.AddSub, associativity: "left", optionName: "concatenate", pure: true, impl: concat }, | ||
| { symbol: "*", kind: "infix", arity: 2, precedence: Precedence.MulDiv, associativity: "left", optionName: "multiply", pure: true, impl: mul }, | ||
| { symbol: "/", kind: "infix", arity: 2, precedence: Precedence.MulDiv, associativity: "left", optionName: "divide", pure: true, impl: div }, | ||
| { symbol: "%", kind: "infix", arity: 2, precedence: Precedence.MulDiv, associativity: "left", optionName: "remainder", pure: true, impl: mod }, | ||
| { symbol: "??", kind: "infix", arity: 2, precedence: Precedence.Coalesce, associativity: "left", optionName: "coalesce", pure: true, impl: coalesce }, | ||
| { symbol: "^", kind: "infix", arity: 2, precedence: Precedence.Exponent, associativity: "right", optionName: "power", pure: true, impl: pow }, | ||
| { symbol: "[", kind: "infix", arity: 2, precedence: Precedence.Member, associativity: "left", optionName: "array", pure: true, impl: arrayIndexOrProperty }, | ||
| { symbol: "-", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "subtract", pure: true, impl: neg }, | ||
| { symbol: "+", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "add", pure: true, impl: pos }, | ||
| { symbol: "!", kind: "postfix", arity: 1, precedence: Precedence.Postfix, associativity: "left", optionName: "factorial", pure: true, impl: fac }, | ||
| { symbol: "?", kind: "ternary", arity: 3, precedence: Precedence.Ternary, associativity: "right", optionName: "conditional", pure: true, impl: condition } | ||
| ]; | ||
| const CORE_FUNCTIONS = []; | ||
| const COMPARISON_OPERATORS = [ | ||
| { symbol: "==", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: equal }, | ||
| { symbol: "!=", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: notEqual }, | ||
| { symbol: "<", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: lessThan }, | ||
| { symbol: "<=", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: lessThanEqual }, | ||
| { symbol: ">", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: greaterThan }, | ||
| { symbol: ">=", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "comparison", pure: true, impl: greaterThanEqual }, | ||
| { symbol: "in", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "in", pure: true, impl: inOperator }, | ||
| { symbol: "not in", kind: "infix", arity: 2, precedence: Precedence.Comparison, associativity: "left", optionName: "in", pure: true, impl: notInOperator } | ||
| ]; | ||
| const LOGICAL_OPERATORS = [ | ||
| { symbol: "or", kind: "infix", arity: 2, precedence: Precedence.Or, associativity: "left", optionName: "logical", pure: true, impl: orOperator }, | ||
| { symbol: "||", kind: "infix", arity: 2, precedence: Precedence.Or, associativity: "left", optionName: "logical", pure: true, impl: orOperator }, | ||
| { symbol: "and", kind: "infix", arity: 2, precedence: Precedence.And, associativity: "left", optionName: "logical", pure: true, impl: andOperator }, | ||
| { symbol: "&&", kind: "infix", arity: 2, precedence: Precedence.And, associativity: "left", optionName: "logical", pure: true, impl: andOperator }, | ||
| { symbol: "not", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "logical", pure: true, impl: not } | ||
| ]; | ||
| const MATH_OPERATORS = [ | ||
| { symbol: "abs", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "abs", pure: true, impl: abs }, | ||
| { symbol: "acos", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "acos", pure: true, impl: acos }, | ||
| { symbol: "acosh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "acosh", pure: true, impl: acosh }, | ||
| { symbol: "asin", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "asin", pure: true, impl: asin }, | ||
| { symbol: "asinh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "asinh", pure: true, impl: asinh }, | ||
| { symbol: "atan", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "atan", pure: true, impl: atan }, | ||
| { symbol: "atanh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "atanh", pure: true, impl: atanh }, | ||
| { symbol: "cbrt", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "cbrt", pure: true, impl: cbrt }, | ||
| { symbol: "ceil", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "ceil", pure: true, impl: ceil }, | ||
| { symbol: "cos", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "cos", pure: true, impl: cos }, | ||
| { symbol: "cosh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "cosh", pure: true, impl: cosh }, | ||
| { symbol: "exp", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "exp", pure: true, impl: exp }, | ||
| { symbol: "expm1", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "expm1", pure: true, impl: expm1 }, | ||
| { symbol: "floor", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "floor", pure: true, impl: floor }, | ||
| { symbol: "lg", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "lg", pure: true, impl: log10 }, | ||
| { symbol: "ln", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "ln", pure: true, impl: log }, | ||
| { symbol: "log", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "log", pure: true, impl: log }, | ||
| { symbol: "log1p", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "log1p", pure: true, impl: log1p }, | ||
| { symbol: "log2", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "log2", pure: true, impl: log2 }, | ||
| { symbol: "log10", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "log10", pure: true, impl: log10 }, | ||
| { symbol: "round", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "round", pure: true, impl: round }, | ||
| { symbol: "sign", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "sign", pure: true, impl: sign }, | ||
| { symbol: "sin", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "sin", pure: true, impl: sin }, | ||
| { symbol: "sinh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "sinh", pure: true, impl: sinh }, | ||
| { symbol: "sqrt", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "sqrt", pure: true, impl: sqrt }, | ||
| { symbol: "tan", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "tan", pure: true, impl: tan }, | ||
| { symbol: "tanh", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "tanh", pure: true, impl: tanh }, | ||
| { symbol: "trunc", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "trunc", pure: true, impl: trunc } | ||
| ]; | ||
| const MATH_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "math" | ||
| ); | ||
| const STRING_OPERATORS = [ | ||
| { symbol: "length", kind: "prefix", arity: 1, precedence: Precedence.Prefix, associativity: "right", optionName: "length", pure: true, impl: length } | ||
| ]; | ||
| const STRING_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "string" | ||
| ); | ||
| const ARRAY_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "array" | ||
| ); | ||
| const OBJECT_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "object" | ||
| ); | ||
| const TYPE_CHECK_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "type-check" | ||
| ); | ||
| const UTILITY_OPERATORS = [ | ||
| { symbol: "as", kind: "infix", arity: 2, precedence: Precedence.Coalesce, associativity: "left", optionName: "conversion", pure: true, impl: asOperator } | ||
| ]; | ||
| const UTILITY_FUNCTIONS = BUILTIN_FUNCTIONS.filter( | ||
| (d) => d.category === "utility" | ||
| ); | ||
| const coreParser = { | ||
| operators: CORE_OPERATORS, | ||
| functions: CORE_FUNCTIONS | ||
| }; | ||
| const withComparison = { | ||
| operators: COMPARISON_OPERATORS, | ||
| functions: [] | ||
| }; | ||
| const withLogical = { | ||
| operators: LOGICAL_OPERATORS, | ||
| functions: [] | ||
| }; | ||
| const withMath = { | ||
| operators: MATH_OPERATORS, | ||
| functions: MATH_FUNCTIONS | ||
| }; | ||
| const withString = { | ||
| operators: STRING_OPERATORS, | ||
| functions: STRING_FUNCTIONS | ||
| }; | ||
| const withArray = { | ||
| operators: [], | ||
| functions: ARRAY_FUNCTIONS | ||
| }; | ||
| const withObject = { | ||
| operators: [], | ||
| functions: OBJECT_FUNCTIONS | ||
| }; | ||
| const withTypeCheck = { | ||
| operators: [], | ||
| functions: TYPE_CHECK_FUNCTIONS | ||
| }; | ||
| const withUtility = { | ||
| operators: UTILITY_OPERATORS, | ||
| functions: UTILITY_FUNCTIONS | ||
| }; | ||
| const fullParser = { | ||
| operators: [ | ||
| ...CORE_OPERATORS, | ||
| ...COMPARISON_OPERATORS, | ||
| ...LOGICAL_OPERATORS, | ||
| ...MATH_OPERATORS, | ||
| ...STRING_OPERATORS, | ||
| ...UTILITY_OPERATORS | ||
| ], | ||
| functions: [ | ||
| ...CORE_FUNCTIONS, | ||
| ...MATH_FUNCTIONS, | ||
| ...STRING_FUNCTIONS, | ||
| ...ARRAY_FUNCTIONS, | ||
| ...OBJECT_FUNCTIONS, | ||
| ...TYPE_CHECK_FUNCTIONS, | ||
| ...UTILITY_FUNCTIONS | ||
| ] | ||
| }; | ||
| export { | ||
| ARRAY_FUNCTIONS as A, | ||
| COMPARISON_OPERATORS as C, | ||
| LOGICAL_OPERATORS as L, | ||
| MATH_FUNCTIONS as M, | ||
| OBJECT_FUNCTIONS as O, | ||
| STRING_FUNCTIONS as S, | ||
| TYPE_CHECK_FUNCTIONS as T, | ||
| UTILITY_FUNCTIONS as U, | ||
| withComparison as a, | ||
| withLogical as b, | ||
| coreParser as c, | ||
| withMath as d, | ||
| withObject as e, | ||
| fullParser as f, | ||
| withString as g, | ||
| withTypeCheck as h, | ||
| withUtility as i, | ||
| MATH_OPERATORS as j, | ||
| STRING_OPERATORS as k, | ||
| UTILITY_OPERATORS as l, | ||
| withArray as w | ||
| }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1062797
28.72%274
25.11%22778
31.51%141
0.71%3
200%