diff --git a/client/space_lua/api_documentation.test.ts b/client/space_lua/api_documentation.test.ts new file mode 100644 index 00000000..1682a772 --- /dev/null +++ b/client/space_lua/api_documentation.test.ts @@ -0,0 +1,70 @@ +import { expect, test } from "vitest"; +import { renderApiDocumentationMarkdown } from "./api_documentation.ts"; + +test("renders deterministic API documentation Markdown", () => { + expect( + renderApiDocumentationMarkdown( + [ + { + kind: "syscall", + name: "demo.zeta", + description: "Does the last thing.", + deprecated: "Use demo.alpha instead.", + see: "API/other", + }, + { + kind: "builtin", + name: "demo.alpha", + description: "Does the first thing.", + parameters: [ + { + name: "value", + type: "string", + description: "Value to process.", + }, + { name: "options", type: "table", optional: true }, + ], + returns: [{ type: "boolean", description: "Whether it worked." }], + examples: [{ code: 'print(demo.alpha("hi"))' }], + see: "API/demo", + }, + ], + "demo", + ), + ).toBe(`### \`demo.alpha\` + +\`demo.alpha(value, options?)\` + +Does the first thing. + +**Parameters:** + +- \`value\` (\`string\`) — Value to process. +- \`options?\` (\`table\`) + +**Returns:** + +- \`boolean\` — Whether it worked. + +**Example:** + +\`\`\`lua +print(demo.alpha("hi")) +\`\`\` + +### \`demo.zeta\` + +\`demo.zeta()\` + +> **Deprecated:** Use demo.alpha instead. + +Does the last thing. + +**See:** [[API/other]]`); +}); + +test("renders an explicit empty target message", () => { + expect(renderApiDocumentationMarkdown([], "missing")).toBe( + "_No documented API functions found for `missing`._", + ); +}); diff --git a/client/space_lua/api_documentation.ts b/client/space_lua/api_documentation.ts new file mode 100644 index 00000000..c5a71271 --- /dev/null +++ b/client/space_lua/api_documentation.ts @@ -0,0 +1,107 @@ +import type { + LuaFunctionExampleDocumentation, + LuaFunctionInfo, + LuaFunctionParameterDocumentation, + LuaFunctionReturnDocumentation, +} from "../../plug-api/types/index.ts"; + +function compareNames(a: LuaFunctionInfo, b: LuaFunctionInfo): number { + const aName = a.name ?? ""; + const bName = b.name ?? ""; + return aName < bName ? -1 : aName > bName ? 1 : 0; +} + +function signature(info: LuaFunctionInfo): string { + const parameters = (info.parameters ?? []) + .map((parameter) => `${parameter.name}${parameter.optional ? "?" : ""}`) + .join(", "); + return `${info.name ?? ""}(${parameters})`; +} + +function renderParameter(parameter: LuaFunctionParameterDocumentation): string { + const type = parameter.type ? ` (\`${parameter.type}\`)` : ""; + const description = parameter.description + ? ` — ${parameter.description}` + : ""; + return `- \`${parameter.name}${parameter.optional ? "?" : ""}\`${type}${description}`; +} + +function renderReturn(value: LuaFunctionReturnDocumentation): string { + const type = value.type ? `\`${value.type}\`` : "Value"; + return `- ${type}${value.description ? ` — ${value.description}` : ""}`; +} + +function codeFence(example: LuaFunctionExampleDocumentation): string[] { + const longestFence = Math.max( + 2, + ...[...example.code.matchAll(/`+/g)].map((match) => match[0].length), + ); + const fence = "`".repeat(longestFence + 1); + return [`${fence}${example.language ?? "lua"}`, example.code, fence]; +} + +function renderFunction( + info: LuaFunctionInfo, + apiNamespace?: string, +): string[] { + const lines = [`### \`${info.name ?? ""}\``, ""]; + const signatures = info.signatures?.length + ? info.signatures + : [signature(info)]; + for (const value of signatures) lines.push(`\`${value}\``); + + if (info.deprecated) { + lines.push( + "", + `> **Deprecated:** ${ + typeof info.deprecated === "string" + ? info.deprecated + : "This function is deprecated." + }`, + ); + } + if (info.description) lines.push("", info.description); + if (info.parameters?.length) { + lines.push("", "**Parameters:**", ""); + lines.push(...info.parameters.map(renderParameter)); + } + if (info.returns?.length) { + lines.push("", "**Returns:**", ""); + lines.push(...info.returns.map(renderReturn)); + } + if (info.examples?.length) { + lines.push( + "", + info.examples.length === 1 ? "**Example:**" : "**Examples:**", + ); + for (const example of info.examples) { + if (example.description) lines.push("", example.description); + lines.push("", ...codeFence(example)); + } + } + const namespacePage = apiNamespace ? `API/${apiNamespace}` : undefined; + if (info.see && info.see !== namespacePage) { + lines.push("", `**See:** [[${info.see}]]`); + } + return lines; +} + +/** Render function metadata as deterministic Markdown for live `${...}` directives. */ +export function renderApiDocumentationMarkdown( + functions: LuaFunctionInfo[], + context?: string, +): string { + const documented = functions.filter((info) => info.name).sort(compareNames); + if (documented.length === 0) { + return context + ? `_No documented API functions found for \`${context}\`._` + : "_No functions found._"; + } + return documented + .flatMap((info, index) => [ + ...(index > 0 ? [""] : []), + ...renderFunction(info, context), + ]) + .join("\n") + .trim(); +} diff --git a/client/space_lua/eval.test.ts b/client/space_lua/eval.test.ts index 7a57f672..fc12b96b 100644 --- a/client/space_lua/eval.test.ts +++ b/client/space_lua/eval.test.ts @@ -1,5 +1,9 @@ import { expect, test } from "vitest"; +import type { LuaBlock, LuaFunctionCallStatement } from "./ast.ts"; +import { evalExpression, evalStatement } from "./eval.ts"; +import { parseBlock } from "./parse.ts"; import { + type ILuaFunction, LuaEnv, LuaNativeJSFunction, LuaStackFrame, @@ -7,9 +11,6 @@ import { luaValueToJS, singleResult, } from "./runtime.ts"; -import { parseBlock } from "./parse.ts"; -import type { LuaBlock, LuaFunctionCallStatement } from "./ast.ts"; -import { evalExpression, evalStatement } from "./eval.ts"; import { luaBuildStandardEnv } from "./stdlib.ts"; const sf = LuaStackFrame.lostFrame; @@ -102,6 +103,73 @@ test("Evaluator test", async () => { expect(fn.body.parameters).toEqual(["a", "b"]); }); +test("Lua doc comments are available through runtime introspection", async () => { + const env = new LuaEnv(luaBuildStandardEnv()); + const sf = LuaStackFrame.createWithGlobalEnv(env); + const block = parseBlock(`--- Adds two values. +---@param a number First value. +---@param b number Second value. +---@return number sum +function add(a, b) + return a + b +end`); + await evalStatement(block, env, sf); + + const fn = env.get("add") as ILuaFunction; + expect(fn.info).toMatchObject({ + name: "add", + kind: "lua", + description: "Adds two values.", + parameters: [ + { name: "a", type: "number" }, + { name: "b", type: "number" }, + ], + returns: [{ type: "number", description: "sum" }], + }); + + const described = await evalExpr("spacelua.describe(add)", env, sf); + expect(luaValueToJS(described, sf)).toMatchObject({ + name: "add", + kind: "lua", + description: "Adds two values.", + }); + const builtins = await evalExpr('spacelua.listFunctions("string")', env, sf); + expect( + (luaValueToJS(builtins, sf) as { name: string }[]).some( + (info) => info.name === "string.find", + ), + ).toBe(true); + + const documentation = await evalExpr( + 'spacelua.renderApiDocumentation("spacelua")', + env, + sf, + ); + expect(documentation).toContain("### `spacelua.describe`"); + expect(documentation).toContain("`spacelua.renderApiDocumentation(target?)`"); +}); + +test("API documentation renders a specific function target", async () => { + const env = new LuaEnv(luaBuildStandardEnv()); + const sf = LuaStackFrame.createWithGlobalEnv(env); + + const byName = await evalExpr( + 'spacelua.renderApiDocumentation("string.find")', + env, + sf, + ); + expect(byName).toContain("### `string.find`"); + expect(byName).not.toContain("### `string.format`"); + + const byValue = await evalExpr( + "spacelua.renderApiDocumentation(string.find)", + env, + sf, + ); + expect(byValue).toContain("### `string.find`"); + expect(byValue).not.toContain("### `assert`"); +}); + test("Parser rejects unary plus - parenthesized", () => { for (const src of [ "return +(1)", diff --git a/client/space_lua/eval.ts b/client/space_lua/eval.ts index 0cdd5758..20edbcb7 100644 --- a/client/space_lua/eval.ts +++ b/client/space_lua/eval.ts @@ -2064,6 +2064,12 @@ export function evalStatement( let errSf: LuaStackFrame | undefined; const ps: Promise[] = []; for (let i = 0; i < lvalues.length; i++) { + if ( + values[i] instanceof LuaFunction && + typeof lvalues[i].key === "string" + ) { + values[i].info.name ??= lvalues[i].key; + } const r = luaSet( lvalues[i].env, lvalues[i].key, @@ -2116,6 +2122,7 @@ export function evalStatement( } const bindOne = (name: any, v: LuaValue) => { + if (v instanceof LuaFunction) v.info.name ??= name.name; const isConst = name.attributes?.includes(LuaAttribute.Const) === true; const isClose = name.attributes?.includes(LuaAttribute.Close) === true; @@ -2387,13 +2394,13 @@ export function evalStatement( } (settable as any).set( propNames[propNames.length - 1], - new LuaFunction(body, env), + new LuaFunction(body, env, { name: propNames.join(".") }), ); return; } case "LocalFunction": { const lf = asLocalFunction(s); - env.setLocal(lf.name, new LuaFunction(lf.body, env)); + env.setLocal(lf.name, new LuaFunction(lf.body, env, { name: lf.name })); return; } case "Return": { diff --git a/client/space_lua/runtime.ts b/client/space_lua/runtime.ts index 39e8a65f..d0952af6 100644 --- a/client/space_lua/runtime.ts +++ b/client/space_lua/runtime.ts @@ -5,6 +5,7 @@ import { isPromise, rpAll } from "./rp.ts"; import { isNegativeZero, isTaggedFloat } from "./numeric.ts"; import { isSqlNull } from "./sliq_null.ts"; import { luaFormat } from "./stdlib/format.ts"; +import type { LuaFunctionInfo } from "../../plug-api/types/index.ts"; export type LuaType = | "nil" @@ -24,6 +25,8 @@ export interface ILuaFunction { call(sf: LuaStackFrame, ...args: LuaValue[]): Promise | LuaValue; asString(): string; + + info?: LuaFunctionInfo; } export interface ILuaSettable { @@ -453,12 +456,25 @@ export function singleResult(value: any): any { export class LuaFunction implements ILuaFunction { private capturedEnv: LuaEnv; funcHasGotos?: boolean; + info: LuaFunctionInfo; constructor( readonly body: LuaFunctionBody, closure: LuaEnv, + info: Partial = {}, ) { this.capturedEnv = closure; + const documentation = body.documentation ?? {}; + this.info = { + kind: "lua", + source: { ...body.ctx }, + ...documentation, + ...info, + parameters: + info.parameters ?? + documentation.parameters ?? + body.parameters.map((name) => ({ name })), + }; } call(sf: LuaStackFrame, ...args: LuaValue[]): Promise | LuaValue { @@ -562,7 +578,10 @@ function mapFunctionReturnValue(values: any[]): any { } export class LuaNativeJSFunction implements ILuaFunction { - constructor(readonly fn: (...args: JSValue[]) => JSValue) {} + constructor( + readonly fn: (...args: JSValue[]) => JSValue, + public info?: LuaFunctionInfo, + ) {} // Performs automatic conversion between Lua and JS values for arguments, but not for return values call(sf: LuaStackFrame, ...args: LuaValue[]): Promise | LuaValue { @@ -594,6 +613,7 @@ export class LuaNativeJSFunction implements ILuaFunction { export class LuaBuiltinFunction implements ILuaFunction { constructor( readonly fn: (sf: LuaStackFrame, ...args: LuaValue[]) => LuaValue, + public info: LuaFunctionInfo = { kind: "builtin" }, ) {} call(sf: LuaStackFrame, ...args: LuaValue[]): Promise | LuaValue { diff --git a/client/space_lua/stdlib/space_lua.ts b/client/space_lua/stdlib/space_lua.ts index 1af3d079..5c0ca2b2 100644 --- a/client/space_lua/stdlib/space_lua.ts +++ b/client/space_lua/stdlib/space_lua.ts @@ -1,12 +1,16 @@ -import { parseBlock, parseExpressionString } from "../parse.ts"; +import type { LuaFunctionInfo } from "../../../plug-api/types/index.ts"; +import { renderApiDocumentationMarkdown } from "../api_documentation.ts"; import type { LuaBlock, LuaExpression } from "../ast.ts"; import { evalExpression } from "../eval.ts"; +import { parseBlock, parseExpressionString } from "../parse.ts"; import { type PrintOptions, prettyPrintBlock, prettyPrintExpression, } from "../pretty_print.ts"; import { + type ILuaFunction, + isILuaFunction, jsToLuaValue, LuaBuiltinFunction, LuaEnv, @@ -45,6 +49,112 @@ function createAugmentedEnv( return env; } +function globalEnv(sf: LuaStackFrame): LuaEnv { + const env = sf.threadLocal.get("_GLOBAL"); + if (!(env instanceof LuaEnv)) { + throw new Error("_GLOBAL not defined"); + } + return env; +} + +function resolveApiValue( + sf: LuaStackFrame, + path: string, +): ILuaFunction | LuaTable | LuaEnv | null { + let value: any = globalEnv(sf); + for (const part of path.split(".")) { + if (value instanceof LuaEnv || value instanceof LuaTable) { + value = value.get(part, sf); + } else { + return null; + } + if (value && typeof value.then === "function") { + throw new Error("Cannot describe asynchronously resolved API values"); + } + if (value === null || value === undefined) return null; + } + return value; +} + +function functionInfo( + value: unknown, + resolvedName?: string, +): LuaFunctionInfo | null { + if (!isILuaFunction(value)) return null; + return { + ...(value.info ?? { kind: "builtin" }), + name: value.info?.name ?? resolvedName, + }; +} + +function describeFunction( + value: unknown, + resolvedName?: string, +): LuaTable | null { + const info = functionInfo(value, resolvedName); + return info ? (jsToLuaValue(info) as LuaTable) : null; +} + +function listFunctionInfo( + sf: LuaStackFrame, + target?: LuaTable | string, +): LuaFunctionInfo[] { + let namespace: LuaTable | LuaEnv; + let prefix = ""; + if (typeof target === "string") { + const resolved = resolveApiValue(sf, target); + if (!(resolved instanceof LuaTable) && !(resolved instanceof LuaEnv)) { + return []; + } + namespace = resolved; + prefix = `${target}.`; + } else if (target instanceof LuaTable) { + namespace = target; + } else { + namespace = globalEnv(sf); + } + + const functions: LuaFunctionInfo[] = []; + for (const key of [...new Set(namespace.keys())].sort()) { + const value = namespace.get(key, sf); + if (value && typeof (value as any).then === "function") continue; + const info = functionInfo(value, `${prefix}${key}`); + if (info) functions.push(info); + } + return functions; +} + +function functionNamespace(info: LuaFunctionInfo): string | undefined { + const separator = info.name?.lastIndexOf(".") ?? -1; + return separator > 0 ? info.name!.slice(0, separator) : undefined; +} + +function apiDocumentationTarget( + sf: LuaStackFrame, + target?: ILuaFunction | LuaTable | string, +): { functions: LuaFunctionInfo[]; context?: string } { + if (typeof target === "string") { + const resolved = resolveApiValue(sf, target); + const info = functionInfo(resolved, target); + if (info) { + return { functions: [info], context: functionNamespace(info) }; + } + if (resolved instanceof LuaTable || resolved instanceof LuaEnv) { + return { functions: listFunctionInfo(sf, target), context: target }; + } + return { functions: [], context: target }; + } + + const info = functionInfo(target); + if (info) { + return { functions: [info], context: functionNamespace(info) }; + } + if (target instanceof LuaTable) { + return { functions: listFunctionInfo(sf, target) }; + } + return { functions: listFunctionInfo(sf) }; +} + /** * Interpolates a string with lua expressions and returns the result. * @@ -126,6 +236,102 @@ function toPrintOptions( } export const spaceluaApi = new LuaTable({ + describe: new LuaBuiltinFunction( + (sf, target: ILuaFunction | string) => { + const value = + typeof target === "string" ? resolveApiValue(sf, target) : target; + return describeFunction( + value, + typeof target === "string" ? target : undefined, + ); + }, + { + kind: "builtin", + description: + "Returns structured documentation for a Lua function value or dotted API name.", + parameters: [ + { + name: "functionOrName", + type: "function|string", + description: "Function value or dotted API name to inspect.", + }, + ], + returns: [ + { + type: "table|nil", + description: + "Structured function metadata, or `nil` when the target is not a function.", + }, + ], + examples: [ + { + code: 'local info = spacelua.describe(editor.getText)\nprint(info.name, info.kind, info.see)\n\nlocal sameInfo = spacelua.describe("editor.getText")', + }, + ], + see: "API/spacelua", + }, + ), + listFunctions: new LuaBuiltinFunction( + (sf, target?: LuaTable | string) => + jsToLuaValue(listFunctionInfo(sf, target)), + { + kind: "builtin", + description: + "Lists documented functions in the global environment or an API namespace.", + parameters: [ + { + name: "namespace", + type: "table|string", + description: "Namespace table or dotted name; omit for globals.", + optional: true, + }, + ], + returns: [{ type: "table", description: "Function metadata records." }], + examples: [ + { + code: 'for info in each(spacelua.listFunctions("editor")) do\n print(info.name, info.description or info.see)\nend', + }, + ], + see: "API/spacelua", + }, + ), + renderApiDocumentation: new LuaBuiltinFunction( + (sf, target?: ILuaFunction | LuaTable | string): string => { + const selection = apiDocumentationTarget(sf, target); + return renderApiDocumentationMarkdown( + selection.functions, + selection.context, + ); + }, + { + kind: "builtin", + description: + "Renders API documentation for a function, namespace, or the global environment as Markdown.", + parameters: [ + { + name: "target", + type: "function|table|string", + description: + "Function value, namespace table, or dotted API name to document; omit for globals.", + optional: true, + }, + ], + returns: [{ type: "string", description: "Rendered Markdown." }], + examples: [ + { + code: '${spacelua.renderApiDocumentation("lua")}', + description: "Render a namespace as a live API-page directive.", + language: "markdown", + }, + { + code: '${spacelua.renderApiDocumentation("editor.getText")}', + description: "Render one function by its dotted API name.", + language: "markdown", + }, + ], + see: "API/spacelua", + }, + ), /** * Parses a lua expression and returns the parsed expression. * @@ -133,9 +339,29 @@ export const spaceluaApi = new LuaTable({ * @param luaExpression - The lua expression to parse. * @returns The parsed expression. */ - parseExpression: new LuaBuiltinFunction((_sf, luaExpression: string) => { - return parseExpressionString(luaExpression); - }), + parseExpression: new LuaBuiltinFunction( + (_sf, luaExpression: string) => { + return parseExpressionString(luaExpression); + }, + { + kind: "builtin", + description: "Parses a Lua expression and returns its AST.", + parameters: [ + { + name: "luaExpression", + type: "string", + description: "Lua expression to parse.", + }, + ], + returns: [{ type: "table", description: "Parsed expression AST." }], + examples: [ + { + code: 'local parsed = spacelua.parseExpression("1 + 1")', + }, + ], + see: "API/spacelua", + }, + ), /** * Parses a lua chunk (block) and returns the parsed AST block. * @@ -143,9 +369,26 @@ export const spaceluaApi = new LuaTable({ * @param code - The lua code to parse. * @returns The parsed block. */ - parseBlock: new LuaBuiltinFunction((_sf, code: string): LuaBlock => { - return parseBlock(code); - }), + parseBlock: new LuaBuiltinFunction( + (_sf, code: string): LuaBlock => { + return parseBlock(code); + }, + { + kind: "builtin", + description: + "Parses a Lua chunk and returns its AST. Blocks retain comments in source order with their exact text, kind, and source range.", + parameters: [ + { name: "code", type: "string", description: "Lua code to parse." }, + ], + returns: [{ type: "table", description: "Parsed block AST." }], + examples: [ + { + code: 'local parsed = spacelua.parseBlock("local x = 1\\nreturn x + 2")', + }, + ], + see: "API/spacelua", + }, + ), /** * Pretty-prints a parsed lua block AST back to formatted source. * @@ -158,6 +401,28 @@ export const spaceluaApi = new LuaTable({ (sf, block: LuaBlock, opts?: LuaTable): string => { return prettyPrintBlock(block, toPrintOptions(sf, opts)); }, + { + kind: "builtin", + description: + "Pretty-prints a parsed Lua block AST. Comments are preserved while their placement and indentation are normalized.", + parameters: [ + { name: "block", type: "table", description: "Parsed block AST." }, + { + name: "options", + type: "table", + description: + "Formatting options: `indentWidth`, `quote`, and `trailingComma`.", + optional: true, + }, + ], + returns: [{ type: "string", description: "Formatted Lua source." }], + examples: [ + { + code: 'local formatted = spacelua.prettyPrintBlock(spacelua.parseBlock("if a then return 1 end"))\nprint(formatted)', + }, + ], + see: "API/spacelua", + }, ), /** * Pretty-prints a parsed lua expression AST back to formatted source. @@ -171,6 +436,31 @@ export const spaceluaApi = new LuaTable({ (sf, expr: LuaExpression, opts?: LuaTable): string => { return prettyPrintExpression(expr, toPrintOptions(sf, opts)); }, + { + kind: "builtin", + description: "Pretty-prints a parsed Lua expression AST.", + parameters: [ + { + name: "parsedExpr", + type: "table", + description: "Parsed expression AST.", + }, + { + name: "options", + type: "table", + description: + "Formatting options: `indentWidth`, `quote`, and `trailingComma`.", + optional: true, + }, + ], + returns: [{ type: "string", description: "Formatted Lua source." }], + examples: [ + { + code: 'local parsed = spacelua.parseExpression("{a=1,b=2}")\nprint(spacelua.prettyPrintExpression(parsed))', + }, + ], + see: "API/spacelua", + }, ), /** * Evaluates a parsed lua expression and returns the result. @@ -185,6 +475,31 @@ export const spaceluaApi = new LuaTable({ const env = createAugmentedEnv(sf, envAugmentation); return luaValueToJS(await evalExpression(parsedExpr, env, sf), sf); }, + { + kind: "builtin", + description: + "Evaluates a parsed Lua expression, optionally with additional environment values.", + parameters: [ + { + name: "parsedExpr", + type: "table", + description: "Parsed expression AST.", + }, + { + name: "envAugmentation", + type: "table", + description: "Values added to the expression environment.", + optional: true, + }, + ], + returns: [{ description: "Evaluated result." }], + examples: [ + { + code: 'local parsed = spacelua.parseExpression("x + y")\nlocal result = spacelua.evalExpression(parsed, {x = 1, y = 2})\nprint(result)', + }, + ], + see: "API/spacelua", + }, ), /** * Interpolates a string with lua expressions and returns the result. @@ -196,12 +511,47 @@ export const spaceluaApi = new LuaTable({ } return interpolateLuaString(sf, template, envAugmentation); }, + { + kind: "builtin", + description: + "Interpolates `${...}` Lua expressions in a string, optionally with additional environment values.", + parameters: [ + { + name: "template", + type: "string", + description: "Template containing `${...}` expressions.", + }, + { + name: "envAugmentation", + type: "table", + description: "Values added to the interpolation environment.", + optional: true, + }, + ], + returns: [{ type: "string", description: "Interpolated string." }], + examples: [ + { + code: 'local greeting = spacelua.interpolate("Hello ${name}!", {name = "Pete"})\nprint(greeting)', + }, + ], + see: "API/spacelua", + }, ), /** * Returns your SilverBullet instance's base URL */ - baseUrl: new LuaBuiltinFunction(() => { - //NOTE: Removing trailing slash to stay compatible with original code: `location.protocol + "//" + location.host;` - return document.baseURI.replace(/\/*$/, ""); - }), + baseUrl: new LuaBuiltinFunction( + () => { + //NOTE: Removing trailing slash to stay compatible with original code: `location.protocol + "//" + location.host;` + return document.baseURI.replace(/\/*$/, ""); + }, + { + kind: "builtin", + description: + "Returns the SilverBullet instance's base URL, or `nil` when run on the server.", + returns: [{ type: "string|nil" }], + examples: [{ code: "local url = spacelua.baseUrl()\nprint(url)" }], + see: "API/spacelua", + }, + ), });