@prisma/orm-framework 8.0.0-rc.13-dev.12 → 8.0.0-rc.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{authoring-CkhGdiKn.d.mts → authoring-BfEjYZpO.d.mts} +6 -2
- package/dist/authoring-BfEjYZpO.d.mts.map +1 -0
- package/dist/{authoring-DhgHAcho.mjs → authoring-CL-ZB448.mjs} +14 -3
- package/dist/authoring-CL-ZB448.mjs.map +1 -0
- package/dist/components.d.mts +4 -4
- package/dist/components.mjs +5 -5
- package/dist/components__authoring.d.mts +2 -2
- package/dist/components__authoring.mjs +3 -3
- package/dist/components__control.d.mts +1 -1
- package/dist/components__control.mjs +2 -2
- package/dist/components__runtime.d.mts +1 -1
- package/dist/components__runtime.mjs +1 -1
- package/dist/{config-types-CYV9_0NR.d.mts → config-types-7cVcsDOV.d.mts} +2 -2
- package/dist/{config-types-CYV9_0NR.d.mts.map → config-types-7cVcsDOV.d.mts.map} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config__config-types.d.mts +1 -1
- package/dist/contract-authoring.d.mts +1 -1
- package/dist/contract-authoring.mjs +1 -1
- package/dist/{control-D73xdx5m.d.mts → control-CuhULO0T.d.mts} +3 -1
- package/dist/control-CuhULO0T.d.mts.map +1 -0
- package/dist/{control-C8b0171V.mjs → control-DdocW8ZP.mjs} +2 -2
- package/dist/{control-C8b0171V.mjs.map → control-DdocW8ZP.mjs.map} +1 -1
- package/dist/{declarations-BrSntcPa-B7o_RLzl.mjs → declarations-BrSntcPa-BUYk6wxW.mjs} +2 -2
- package/dist/{declarations-BrSntcPa-B7o_RLzl.mjs.map → declarations-BrSntcPa-BUYk6wxW.mjs.map} +1 -1
- package/dist/errors.d.mts +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/{execution-CIHi2H0X.d.mts → execution-BFJC3QTj.d.mts} +2 -2
- package/dist/{execution-CIHi2H0X.d.mts.map → execution-BFJC3QTj.d.mts.map} +1 -1
- package/dist/{parse-CfZKsx8i-D3tSvB__.mjs → parse-CfZKsx8i-DpxGIwhF.mjs} +2 -2
- package/dist/{parse-CfZKsx8i-D3tSvB__.mjs.map → parse-CfZKsx8i-DpxGIwhF.mjs.map} +1 -1
- package/dist/{parse-DZRO_CK2-BoanB9nL.d.mts → parse-DZRO_CK2-BtDklsaV.d.mts} +3 -3
- package/dist/{parse-DZRO_CK2-BoanB9nL.d.mts.map → parse-DZRO_CK2-BtDklsaV.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +4 -4
- package/dist/psl-parser.mjs +2 -2
- package/dist/psl-parser__format.mjs +2 -2
- package/dist/psl-parser__interpret.d.mts +6 -5
- package/dist/psl-parser__interpret.d.mts.map +1 -1
- package/dist/psl-parser__interpret.mjs +6 -3
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-parser__syntax.mjs +2 -2
- package/dist/psl-printer.d.mts +1 -1
- package/dist/psl-printer.mjs +1 -1
- package/dist/{runtime-DhZBXZMY.d.mts → runtime-BWD7UzMV.d.mts} +2 -2
- package/dist/{runtime-DhZBXZMY.d.mts.map → runtime-BWD7UzMV.d.mts.map} +1 -1
- package/dist/{runtime-CpojufYS.mjs → runtime-DhUFoLHx.mjs} +22 -10
- package/dist/runtime-DhUFoLHx.mjs.map +1 -0
- package/dist/{symbol-table-ikmivfwq-Hs89sDzX.d.mts → symbol-table-ikmivfwq-u2--jZQG.d.mts} +2 -2
- package/dist/{symbol-table-ikmivfwq-Hs89sDzX.d.mts.map → symbol-table-ikmivfwq-u2--jZQG.d.mts.map} +1 -1
- package/dist/{temporal-presets-Cqi6Fnl--DNtY0oCw.mjs → temporal-presets-MavBeaJC-BcqWVoBB.mjs} +24 -15
- package/dist/{temporal-presets-Cqi6Fnl--DNtY0oCw.mjs.map → temporal-presets-MavBeaJC-BcqWVoBB.mjs.map} +1 -1
- package/package.json +15 -15
- package/dist/authoring-CkhGdiKn.d.mts.map +0 -1
- package/dist/authoring-DhgHAcho.mjs.map +0 -1
- package/dist/control-D73xdx5m.d.mts.map +0 -1
- package/dist/runtime-CpojufYS.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-CfZKsx8i-D3tSvB__.mjs","names":["#filename","#text","#lineStarts","#lineIndexAt","#lineStartAt","#lineEndAt","#sourcesByRoot","#stack","#tokenizer","#sourceFile","#diagnostics","#offset","#depth","#builder","#advance"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-CfZKsx8i.mjs"],"sourcesContent":["import { r as isTerminatedStringLiteral, t as Tokenizer } from \"./tokenizer-BMz7z2KR.mjs\";\nimport { l as createSyntaxTree } from \"./ast-helpers-2XRnkQEO.mjs\";\nimport { n as DocumentAst } from \"./declarations-BrSntcPa.mjs\";\nimport { UNSPECIFIED_PSL_NAMESPACE_ID } from \"@internal/framework-components/psl-ast\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/source-file.ts\nconst CARRIAGE_RETURN = 13;\nconst LINE_FEED = 10;\nvar SourceFile = class {\n\t#filename;\n\t#text;\n\t#lineStarts;\n\tconstructor(filename, text) {\n\t\tthis.#filename = filename;\n\t\tthis.#text = text;\n\t\tconst lineStarts = [0];\n\t\tfor (let offset = 0; offset < text.length; offset++) if (text.charCodeAt(offset) === LINE_FEED) lineStarts.push(offset + 1);\n\t\tthis.#lineStarts = lineStarts;\n\t}\n\tget filename() {\n\t\treturn this.#filename;\n\t}\n\tget text() {\n\t\treturn this.#text;\n\t}\n\tget length() {\n\t\treturn this.#text.length;\n\t}\n\tget lineCount() {\n\t\treturn this.#lineStarts.length;\n\t}\n\tlineStartOffsets() {\n\t\treturn this.#lineStarts;\n\t}\n\tlineStartOffset(line) {\n\t\tif (line <= 0) return 0;\n\t\treturn this.#lineStarts[line] ?? this.#text.length;\n\t}\n\tlineEndOffset(line) {\n\t\tif (line < 0) return 0;\n\t\tconst nextLineStart = this.#lineStarts[line + 1];\n\t\tif (nextLineStart === void 0) return this.#text.length;\n\t\tconst lineFeedOffset = nextLineStart - 1;\n\t\tconst carriageReturnOffset = lineFeedOffset - 1;\n\t\treturn this.#text.charCodeAt(carriageReturnOffset) === CARRIAGE_RETURN ? carriageReturnOffset : lineFeedOffset;\n\t}\n\tpositionAt(offset) {\n\t\tconst clamped = clamp(offset, 0, this.#text.length);\n\t\tconst line = this.#lineIndexAt(clamped);\n\t\treturn {\n\t\t\tline,\n\t\t\tcharacter: clamped - this.#lineStartAt(line)\n\t\t};\n\t}\n\toffsetAt(position) {\n\t\tconst line = clamp(position.line, 0, this.#lineStarts.length - 1);\n\t\tconst lineStart = this.#lineStartAt(line);\n\t\tconst lineEnd = this.#lineEndAt(line);\n\t\treturn clamp(lineStart + position.character, lineStart, lineEnd);\n\t}\n\toffsetToPslPosition(offset) {\n\t\tconst position = this.positionAt(offset);\n\t\treturn {\n\t\t\toffset,\n\t\t\tline: position.line + 1,\n\t\t\tcolumn: position.character + 1\n\t\t};\n\t}\n\trangeToPslSpan(range) {\n\t\treturn {\n\t\t\tstart: this.offsetToPslPosition(this.offsetAt(range.start)),\n\t\t\tend: this.offsetToPslPosition(this.offsetAt(range.end))\n\t\t};\n\t}\n\tpslSpanToRange(span) {\n\t\treturn {\n\t\t\tstart: this.positionAt(span.start.offset),\n\t\t\tend: this.positionAt(span.end.offset)\n\t\t};\n\t}\n\t#lineStartAt(line) {\n\t\treturn this.#lineStarts[line] ?? 0;\n\t}\n\t#lineEndAt(line) {\n\t\treturn line + 1 < this.#lineStarts.length ? this.#lineStartAt(line + 1) - 1 : this.#text.length;\n\t}\n\t#lineIndexAt(offset) {\n\t\tconst lineStarts = this.#lineStarts;\n\t\tlet low = 0;\n\t\tlet high = lineStarts.length - 1;\n\t\twhile (low < high) {\n\t\t\tconst mid = low + high + 1 >>> 1;\n\t\t\tif ((lineStarts[mid] ?? 0) <= offset) low = mid;\n\t\t\telse high = mid - 1;\n\t\t}\n\t\treturn low;\n\t}\n};\nvar PslSources = class PslSources {\n\t#sourcesByRoot = /* @__PURE__ */ new Map();\n\tconstructor(entries) {\n\t\tfor (const [root, sourceFile] of entries) this.#sourcesByRoot.set(root, sourceFile);\n\t}\n\t/**\n\t* A new registry uniting this one with `others` — e.g. the per-document\n\t* `PslSources` registries `parse()` returns for each member of a\n\t* multi-file schema, united into the one registry `buildSymbolTable` and\n\t* the interpreters expect.\n\t*/\n\tmerge(...others) {\n\t\treturn new PslSources([...this.#sourcesByRoot, ...others.flatMap((other) => [...other.#sourcesByRoot])]);\n\t}\n\tsourceFileNamed(filename) {\n\t\tlet match;\n\t\tfor (const sourceFile of this.#sourcesByRoot.values()) {\n\t\t\tif (sourceFile.filename !== filename) continue;\n\t\t\tif (match !== void 0 && match.text !== sourceFile.text) throw new InternalError(`Ambiguous PSL diagnostic filename \"${filename}\": registered sources have different text`);\n\t\t\tmatch = sourceFile;\n\t\t}\n\t\tif (match === void 0) throw new InternalError(`No SourceFile registered for PSL diagnostic filename \"${filename}\"`);\n\t\treturn match;\n\t}\n\tsourceFileFor(node) {\n\t\tconst root = node.root();\n\t\tconst sourceFile = this.#sourcesByRoot.get(root);\n\t\tif (sourceFile === void 0) throw new InternalError(\"No SourceFile registered for PSL syntax root\");\n\t\treturn sourceFile;\n\t}\n};\nfunction clamp(value, min, max) {\n\tif (value < min) return min;\n\tif (value > max) return max;\n\treturn value;\n}\n//#endregion\n//#region src/syntax/green.ts\nfunction greenToken(kind, text) {\n\treturn {\n\t\ttype: \"token\",\n\t\tkind,\n\t\ttext\n\t};\n}\nfunction greenNode(kind, children) {\n\tlet textLength = 0;\n\tfor (const child of children) textLength += child.type === \"token\" ? child.text.length : child.textLength;\n\treturn {\n\t\ttype: \"node\",\n\t\tkind,\n\t\tchildren,\n\t\ttextLength\n\t};\n}\n//#endregion\n//#region src/syntax/green-builder.ts\nvar GreenNodeBuilder = class {\n\t#stack = [];\n\tstartNode(kind) {\n\t\tthis.#stack.push({\n\t\t\tkind,\n\t\t\tchildren: []\n\t\t});\n\t}\n\ttoken(kind, text) {\n\t\tconst current = this.#stack.at(-1);\n\t\tif (!current) throw new InternalError(\"GreenNodeBuilder: token() called with no open node\");\n\t\tcurrent.children.push(greenToken(kind, text));\n\t}\n\tfinishNode() {\n\t\tconst completed = this.#stack.pop();\n\t\tif (!completed) throw new InternalError(\"GreenNodeBuilder: finishNode() called with no open node\");\n\t\tconst node = greenNode(completed.kind, completed.children);\n\t\tconst parent = this.#stack.at(-1);\n\t\tif (parent) parent.children.push(node);\n\t\treturn node;\n\t}\n};\n//#endregion\n//#region src/parse.ts\nconst TRIVIA_KINDS = /* @__PURE__ */ new Set([\n\t\"Whitespace\",\n\t\"Newline\",\n\t\"Comment\"\n]);\n/**\n* The fault-tolerant parser substrate the parse functions below drive. Trivia is flushed\n* into the enclosing open node, so every child node spans exactly its first\n* through last significant token.\n*/\nvar Cursor = class {\n\t#tokenizer;\n\t#sourceFile;\n\t#builder = new GreenNodeBuilder();\n\t#diagnostics = [];\n\t#offset = 0;\n\t#depth = 0;\n\tconstructor(filename, source) {\n\t\tthis.#tokenizer = new Tokenizer(source);\n\t\tthis.#sourceFile = new SourceFile(filename, source);\n\t}\n\tget diagnostics() {\n\t\treturn this.#diagnostics;\n\t}\n\tget sourceFile() {\n\t\treturn this.#sourceFile;\n\t}\n\tpeekKind(ahead = 0) {\n\t\treturn this.peekToken(ahead).kind;\n\t}\n\tpeekToken(ahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet remaining = ahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return token;\n\t\t\tif (TRIVIA_KINDS.has(token.kind)) {\n\t\t\t\trawIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (remaining === 0) return token;\n\t\t\tremaining--;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/** Span of the significant token `lookahead` positions ahead (`mark(0)` = the next). */\n\tmark(lookahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet offset = this.#offset;\n\t\tlet remaining = lookahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind) && remaining === 0) return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) remaining--;\n\t\t\toffset += token.text.length;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/**\n\t* Zero-width mark just past the last consumed significant token — anchors an\n\t* \"expected here\" diagnostic, e.g. the `{` missing after a declaration's name.\n\t*/\n\tmarkAfterLastToken() {\n\t\treturn {\n\t\t\toffset: this.#offset,\n\t\t\tlength: 0\n\t\t};\n\t}\n\tstartNode(kind) {\n\t\tif (this.#depth > 0) this.flushTrivia();\n\t\tthis.#builder.startNode(kind);\n\t\tthis.#depth++;\n\t}\n\tfinishNode() {\n\t\tthis.#depth--;\n\t\treturn this.#builder.finishNode();\n\t}\n\tbump() {\n\t\tthis.flushTrivia();\n\t\tconst token = this.#tokenizer.peek();\n\t\tif (token.kind === \"Eof\") return token;\n\t\tthis.#builder.token(token.kind, token.text);\n\t\tthis.#advance();\n\t\treturn token;\n\t}\n\trecoverToSyncPoint() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (token.kind === \"Eof\" || token.kind === \"Newline\" || token.kind === \"RBrace\") return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tflushTrivia() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tdiagnostic(code, message, mark) {\n\t\tconst start = mark.offset;\n\t\tconst end = start + mark.length;\n\t\tthis.#diagnostics.push({\n\t\t\tfilename: this.#sourceFile.filename,\n\t\t\tcode,\n\t\t\tmessage,\n\t\t\trange: {\n\t\t\t\tstart: this.#sourceFile.positionAt(start),\n\t\t\t\tend: this.#sourceFile.positionAt(end)\n\t\t\t}\n\t\t});\n\t}\n\t#advance() {\n\t\tthis.#offset += this.#tokenizer.next().text.length;\n\t}\n};\nfunction parseIdentifier(cursor) {\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Returns `undefined` when the next significant token does not start a\n* recognised expression, leaving recovery to the caller.\n*/\nfunction parseExpression(cursor) {\n\treturn parseStringLiteralExpr(cursor) ?? parseNumberLiteralExpr(cursor) ?? parseArrayLiteral(cursor) ?? parseObjectLiteralExpr(cursor) ?? parseTaggedLiteral(cursor) ?? parseFunctionCall(cursor) ?? parseBooleanLiteralExpr(cursor) ?? parseIdentifierExpr(cursor);\n}\n/** A string literal outside a tagged literal, where a backtick string is refused. */\nfunction parseStringLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"StringLiteral\") return void 0;\n\tif (cursor.peekToken().text.startsWith(\"`\")) cursor.diagnostic(\"PSL_BACKTICK_STRING_REQUIRES_TAG\", \"A backtick string must follow a tag, as in tag`...`.\", cursor.mark());\n\treturn parseStringLiteral(cursor);\n}\nfunction parseStringLiteral(cursor) {\n\tconst stringMark = cursor.mark();\n\tconst text = cursor.peekToken().text;\n\tcursor.startNode(\"StringLiteralExpr\");\n\tcursor.bump();\n\tif (!isTerminatedStringLiteral(text)) cursor.diagnostic(\"PSL_UNTERMINATED_STRING\", \"Unterminated string literal\", stringMark);\n\treturn cursor.finishNode();\n}\nfunction parseNumberLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"NumberLiteral\") return void 0;\n\tcursor.startNode(\"NumberLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\n/**\n* Parses a namespace-qualified name `[space ':']? Ident ('.' Ident)*`. The\n* caller guarantees a leading `Ident`.\n*\n* Parsing the whole chain up front lets a position decide\n* constructor-vs-reference by peeking exactly one token for `(`, with no scan of\n* the dotted chain's length.\n*/\nfunction parseQualifiedName(cursor) {\n\tcursor.startNode(\"QualifiedName\");\n\tparseIdentifier(cursor);\n\tparseQualifiedSegments(cursor, \"Colon\");\n\tparseQualifiedSegments(cursor, \"Dot\");\n\tcursor.finishNode();\n}\n/**\n* A well-formed name carries at most one colon space and one dot namespace, so\n* each separator past the first of its kind reports `PSL_INVALID_QUALIFIED_NAME`.\n* The separator is consumed regardless, keeping the lossless round-trip intact.\n*/\nfunction parseQualifiedSegments(cursor, separator) {\n\tlet seen = 0;\n\twhile (cursor.peekKind() === separator) {\n\t\tseen++;\n\t\tconst separatorMark = cursor.mark();\n\t\tcursor.bump();\n\t\tif (seen > 1) cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name has too many segments\", separatorMark);\n\t\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\t\telse cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name is missing a name after the separator\", cursor.mark());\n\t}\n}\n/**\n* Whether the next tokens open a tagged literal: a bare `Ident` or a\n* namespace-qualified `Ident.Ident`, then a string. Trivia may sit anywhere\n* between them. Bounded like {@link isCallAhead}.\n*/\nfunction isTaggedLiteralAhead(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return false;\n\tif (cursor.peekKind(1) === \"StringLiteral\") return true;\n\treturn cursor.peekKind(1) === \"Dot\" && cursor.peekKind(2) === \"Ident\" && cursor.peekKind(3) === \"StringLiteral\";\n}\n/** Parses `` tag`body` ``, `tag\"body\"`, or `tag'body'`: a qualified name, then a string literal. */\nfunction parseTaggedLiteral(cursor) {\n\tif (!isTaggedLiteralAhead(cursor)) return void 0;\n\tcursor.startNode(\"TaggedLiteral\");\n\tparseQualifiedName(cursor);\n\tparseStringLiteral(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseBooleanLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst text = cursor.peekToken().text;\n\tif (text !== \"true\" && text !== \"false\") return void 0;\n\tcursor.startNode(\"BooleanLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseIdentifierExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseArrayLiteral(cursor) {\n\tif (cursor.peekKind() !== \"LBracket\") return void 0;\n\tcursor.startNode(\"ArrayLiteral\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBracket\" && cursor.peekKind() !== \"Eof\") {\n\t\tif (!parseExpression(cursor)) break;\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseObjectLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"LBrace\") return void 0;\n\tconst braceMark = cursor.mark();\n\tcursor.startNode(\"ObjectLiteralExpr\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBrace\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseObjectField(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse if (cursor.peekKind() === \"Ident\") cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected \\\",\\\" between object-literal fields\", cursor.markAfterLastToken());\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Unterminated object literal\", braceMark);\n\treturn cursor.finishNode();\n}\nfunction parseObjectField(cursor) {\n\tcursor.startNode(\"ObjectField\");\n\tconst keyMark = cursor.mark();\n\tconst keyText = cursor.peekToken().text;\n\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\telse if (cursor.peekKind() === \"StringLiteral\") parseStringLiteralExpr(cursor);\n\tif (cursor.peekKind() === \"Colon\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected a value after \\\":\\\"\", cursor.mark());\n\t} else {\n\t\tcursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", `Expected \":\" after \"${keyText}\"`, keyMark);\n\t\tif (!(cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\")) parseExpression(cursor);\n\t}\n\treturn cursor.finishNode();\n}\n/**\n* Whether the next tokens open a call: a bare `Ident(` or a namespace-qualified\n* `Ident.Ident(`. The lookahead is deliberately bounded so a bare dotted\n* reference like `a.b` is not mistaken for a call, rather than scanning an\n* unbounded dotted chain ahead to find the paren.\n*/\nfunction isCallAhead(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return false;\n\tif (cursor.peekKind(1) === \"LParen\") return true;\n\treturn cursor.peekKind(1) === \"Dot\" && cursor.peekKind(2) === \"Ident\" && cursor.peekKind(3) === \"LParen\";\n}\n/**\n* Parses a function/constructor call — bare `autoincrement()` or qualified\n* `temporal.updatedAt()`. Returns `undefined` unless {@link isCallAhead}\n* confirms a trailing `(`, so the `parseExpression` chain falls through to the\n* boolean and bare-identifier forms.\n*/\nfunction parseFunctionCall(cursor) {\n\tif (!isCallAhead(cursor)) return void 0;\n\tcursor.startNode(\"FunctionCall\");\n\tparseQualifiedName(cursor);\n\tif (cursor.peekKind() === \"LParen\") parseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\n/** Parses a parenthesised, comma-separated `AttributeArg` list into the currently open node. */\nfunction parseParenArgs(cursor) {\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RParen\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseAttributeArg(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RParen\") cursor.bump();\n}\nfunction parseAttributeArg(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"StringLiteral\" && kind !== \"NumberLiteral\" && kind !== \"LBracket\" && kind !== \"LBrace\") return;\n\tcursor.startNode(\"AttributeArg\");\n\tif (cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\") {\n\t\tparseIdentifier(cursor);\n\t\tcursor.bump();\n\t}\n\tparseArgValue(cursor);\n\tcursor.finishNode();\n}\nfunction parseArgValue(cursor) {\n\tparseExpression(cursor);\n}\nfunction parseAttributeArgList(cursor) {\n\tcursor.startNode(\"AttributeArgList\");\n\tparseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseAttribute(cursor) {\n\tconst isBlockAttribute = cursor.peekKind() === \"DoubleAt\";\n\tconst attributeMark = cursor.mark();\n\tcursor.startNode(isBlockAttribute ? \"ModelAttribute\" : \"FieldAttribute\");\n\tcursor.bump();\n\tif (cursor.peekKind() === \"Ident\") parseQualifiedName(cursor);\n\telse cursor.diagnostic(\"PSL_INVALID_ATTRIBUTE_SYNTAX\", \"Attribute name expected\", attributeMark);\n\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A type annotation: `QualifiedName (argList)? ([])? (?)?`, e.g.\n* `pgvector.Vector(1536)[]?`. When the field has no type, no node is emitted —\n* a missing type is the absence of a `TypeAnnotation`, not a zero-width one.\n*/\nfunction parseTypeAnnotation(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"LBracket\" && kind !== \"Question\") return;\n\tcursor.startNode(\"TypeAnnotation\");\n\tif (cursor.peekKind() === \"Ident\") {\n\t\tparseQualifiedName(cursor);\n\t\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\t}\n\tif (cursor.peekKind() === \"LBracket\") {\n\t\tcursor.bump();\n\t\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\t}\n\tif (cursor.peekKind() === \"Question\") cursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Parses a full PSL document. Never throws — malformed input yields diagnostics\n* and a recovered tree, not an exception.\n*/\nfunction parse(source, filename) {\n\tconst cursor = new Cursor(filename, source);\n\tconst root = createSyntaxTree(parseDocument(cursor));\n\tconst document = DocumentAst.cast(root) ?? new DocumentAst(root);\n\tconst sources = new PslSources([[document.syntax, cursor.sourceFile]]);\n\treturn {\n\t\tdocument,\n\t\tdiagnostics: cursor.diagnostics,\n\t\tsources\n\t};\n}\nfunction parseDocument(cursor) {\n\tcursor.startNode(\"Document\");\n\twhile (cursor.peekKind() !== \"Eof\") parseDeclaration(cursor, false);\n\tcursor.flushTrivia();\n\treturn cursor.finishNode();\n}\nconst RESERVED_BLOCK_KEYWORDS = /* @__PURE__ */ new Set([\n\t\"model\",\n\t\"namespace\",\n\t\"type\",\n\t\"types\"\n]);\nfunction keywordIs(cursor, keyword) {\n\treturn cursor.peekKind() === \"Ident\" && cursor.peekToken().text === keyword;\n}\n/**\n* Each alternative is a no-op on non-match, consuming nothing, so the\n* forward-only cursor is never left half-consumed by a rejected alternative.\n* Recovery runs via the `if (!node)` tail rather than as a `??` arm, because it\n* appends raw tokens to the open parent instead of returning a child node.\n*/\nfunction parseDeclaration(cursor, insideNamespace) {\n\tconst name = cursor.peekKind(1) === \"Ident\" ? cursor.peekToken(1).text : \"\";\n\tif (insideNamespace && keywordIs(cursor, \"namespace\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Recursive \"namespace ${name}\" block is not allowed; namespace blocks may not nest`, cursor.mark());\n\telse if (insideNamespace && keywordIs(cursor, \"types\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", \"`types` blocks must be declared at the document top level, not inside a namespace block\", cursor.mark());\n\telse if (keywordIs(cursor, \"namespace\") && name === UNSPECIFIED_PSL_NAMESPACE_ID) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Namespace name \"${UNSPECIFIED_PSL_NAMESPACE_ID}\" is reserved for the parser-synthesised bucket for top-level declarations`, cursor.mark(1));\n\tif (!(parseModel(cursor) ?? parseNamespace(cursor) ?? parseCompositeType(cursor) ?? parseTypesBlock(cursor) ?? parseGenericBlock(cursor))) parseUnsupportedTopLevel(cursor);\n}\n/**\n* Reports only the first missing piece — a missing name suppresses the\n* missing-brace diagnostic. `nameRequired` is false only for the `types` block.\n*/\nfunction parseBlock(cursor, kind, nameRequired, parseMember) {\n\tconst keyword = cursor.peekToken().text;\n\tconst keywordMark = cursor.mark();\n\tcursor.startNode(kind);\n\tcursor.bump();\n\tconst hasName = nameRequired && cursor.peekKind() === \"Ident\";\n\tif (hasName) parseIdentifier(cursor);\n\tif (nameRequired && !hasName) cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected a name after \"${keyword}\"`, keywordMark);\n\telse if (cursor.peekKind() !== \"LBrace\") cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, parseMember);\n\telse cursor.recoverToSyncPoint();\n\treturn cursor.finishNode();\n}\nfunction parseModel(cursor) {\n\tif (!keywordIs(cursor, \"model\")) return void 0;\n\treturn parseBlock(cursor, \"ModelDeclaration\", true, parseModelMember);\n}\n/**\n* Excluding the reserved keywords keeps a malformed reserved block (e.g. `model\n* {` with no name) routed to its dedicated parser. The generic keyword set is\n* open, so a bare identifier with no brace (e.g. `oops`) is read as an unfinished\n* custom declaration rather than unsupported content.\n*/\nfunction parseGenericBlock(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst keyword = cursor.peekToken().text;\n\tif (RESERVED_BLOCK_KEYWORDS.has(keyword)) return void 0;\n\tconst hasName = cursor.peekKind(1) === \"Ident\" && cursor.peekKind(2) === \"LBrace\";\n\tcursor.startNode(\"GenericBlockDeclaration\");\n\tcursor.bump();\n\tif (hasName) parseIdentifier(cursor);\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, genericBlockMemberParser(keyword));\n\telse {\n\t\tcursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\t\tcursor.recoverToSyncPoint();\n\t}\n\treturn cursor.finishNode();\n}\nfunction parseNamespace(cursor) {\n\tif (!keywordIs(cursor, \"namespace\")) return void 0;\n\treturn parseBlock(cursor, \"Namespace\", true, (inner) => parseDeclaration(inner, true));\n}\nfunction parseCompositeType(cursor) {\n\tif (!keywordIs(cursor, \"type\")) return void 0;\n\treturn parseBlock(cursor, \"CompositeTypeDeclaration\", true, parseModelMember);\n}\n/** `types` (plural) is the no-name types block; the singular `type` is the composite type above. */\nfunction parseTypesBlock(cursor) {\n\tif (!keywordIs(cursor, \"types\")) return void 0;\n\treturn parseBlock(cursor, \"TypesBlock\", false, parseNamedTypeMember);\n}\n/** Every `parseMember` consumes at least one significant token, so the loop always terminates. */\nfunction parseBlockBody(cursor, parseMember) {\n\tconst braceMark = cursor.mark();\n\tcursor.bump();\n\tfor (;;) {\n\t\tconst kind = cursor.peekKind();\n\t\tif (kind === \"RBrace\" || kind === \"Eof\") break;\n\t\tparseMember(cursor);\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_UNTERMINATED_BLOCK\", \"Unterminated block declaration\", braceMark);\n}\nfunction parseUnsupportedTopLevel(cursor) {\n\tconst offending = cursor.peekToken().text;\n\tconst message = cursor.peekKind(1) === \"LBrace\" ? `Unsupported top-level block \"${offending}\"` : `Unsupported top-level declaration \"${offending}\"`;\n\tcursor.diagnostic(\"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\", message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\n/**\n* Matches a leading `@@` block attribute, a no-op otherwise. Single-`@`\n* attributes belong to fields and are parsed inside `parseField`.\n*/\nfunction parseBlockAttribute(cursor) {\n\tif (cursor.peekKind() !== \"DoubleAt\") return void 0;\n\treturn parseAttribute(cursor);\n}\nfunction parseModelMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseField(cursor))) invalidMember(cursor, \"PSL_INVALID_MODEL_MEMBER\", `Invalid model member declaration \"${cursor.peekToken().text}\"`);\n}\nfunction parseNamedTypeMember(cursor) {\n\tif (!parseNamedType(cursor)) invalidMember(cursor, \"PSL_INVALID_TYPES_MEMBER\", `Invalid types declaration \"${cursor.peekToken().text}\"`);\n}\n/**\n* A `view` body is read like a model body. Every other generic block reads `key = value` entries\n* and bare keys, and in an `enum` block those may carry `@` attributes (`USER @map(\"user\")`). Each\n* interpreter decides whether it accepts the block and its members.\n*/\nfunction genericBlockMemberParser(keyword) {\n\tif (keyword === \"view\") return parseModelMember;\n\tif (keyword === \"enum\") return parseEnumMember;\n\treturn parseKeyValueMember;\n}\n/**\n* A generic-block member is either a `@@`-block attribute or a `key = value`\n* entry. The block-attribute alternative is purely syntactic — it does not judge\n* whether the attribute is valid for the block's kind.\n*/\nfunction parseKeyValueMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor))) invalidMember(cursor, \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Invalid block entry\");\n}\nfunction parseEnumMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor, { memberAttributes: true }))) invalidMember(cursor, \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Invalid block entry\");\n}\nfunction invalidMember(cursor, code, message) {\n\tcursor.diagnostic(code, message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\nfunction parseField(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"FieldDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() !== \"Ident\") cursor.diagnostic(\"PSL_INVALID_MODEL_MEMBER\", `Expected a type after field \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseNamedType(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"NamedTypeDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_TYPES_MEMBER\", `Expected \"=\" after \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A generic-block entry is either `key = value` or a bare `key` (committing a\n* `KeyValuePair` carrying only the key). With `memberAttributes` (enum blocks) any number of `@`\n* attributes may follow, as in `USER @map(\"user\")`. A `key =` with no following expression is\n* flagged.\n*/\nfunction parseKeyValue(cursor, options = { memberAttributes: false }) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"KeyValuePair\");\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Expected a value after \\\"=\\\"\", cursor.mark());\n\t}\n\twhile (options.memberAttributes && cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\n//#endregion\nexport { PslSources as a, greenToken as i, GreenNodeBuilder as n, SourceFile as o, greenNode as r, parse as t };\n\n//# sourceMappingURL=parse-CfZKsx8i.mjs.map"],"mappings":";;;;;;AAMA,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAClB,IAAI,aAAa,MAAM;CACtB;CACA;CAC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gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,WAAW,4BAA4B,gCAAgC,SAAS,IAAI,QAAQ;CACtI,oBAAoB,MAAM;CAC1B,OAAO,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACxD,OAAO,OAAO,WAAW;AAC1B;AACA,SAAS,eAAe,QAAQ;CAC/B,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,KAAK;CAC/C,OAAO,UAAU,sBAAsB;CACvC,MAAM,WAAW,OAAO,KAAK;CAC7B,MAAM,WAAW,OAAO,UAAU,CAAC,CAAC;CACpC,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,UAAU,OAAO,KAAK;MAC3C,OAAO,WAAW,4BAA4B,uBAAuB,SAAS,IAAI,QAAQ;CAC/F,oBAAoB,MAAM;CAC1B,OAAO,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACxD,OAAO,OAAO,WAAW;AAC1B;;;;;;;AAOA,SAAS,cAAc,QAAQ,UAAU,EAAE,kBAAkB,MAAM,GAAG;CACrE,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,KAAK;CAC/C,OAAO,UAAU,cAAc;CAC/B,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,UAAU;EACnC,OAAO,KAAK;EACZ,IAAI,CAAC,gBAAgB,MAAM,GAAG,OAAO,WAAW,sCAAsC,gCAAgC,OAAO,KAAK,CAAC;CACpI;CACA,OAAO,QAAQ,oBAAoB,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACpF,OAAO,OAAO,WAAW;AAC1B"}
|
|
1
|
+
{"version":3,"file":"parse-CfZKsx8i-DpxGIwhF.mjs","names":["#filename","#text","#lineStarts","#lineIndexAt","#lineStartAt","#lineEndAt","#sourcesByRoot","#stack","#tokenizer","#sourceFile","#diagnostics","#offset","#depth","#builder","#advance"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-CfZKsx8i.mjs"],"sourcesContent":["import { r as isTerminatedStringLiteral, t as Tokenizer } from \"./tokenizer-BMz7z2KR.mjs\";\nimport { l as createSyntaxTree } from \"./ast-helpers-2XRnkQEO.mjs\";\nimport { n as DocumentAst } from \"./declarations-BrSntcPa.mjs\";\nimport { UNSPECIFIED_PSL_NAMESPACE_ID } from \"@internal/framework-components/psl-ast\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/source-file.ts\nconst CARRIAGE_RETURN = 13;\nconst LINE_FEED = 10;\nvar SourceFile = class {\n\t#filename;\n\t#text;\n\t#lineStarts;\n\tconstructor(filename, text) {\n\t\tthis.#filename = filename;\n\t\tthis.#text = text;\n\t\tconst lineStarts = [0];\n\t\tfor (let offset = 0; offset < text.length; offset++) if (text.charCodeAt(offset) === LINE_FEED) lineStarts.push(offset + 1);\n\t\tthis.#lineStarts = lineStarts;\n\t}\n\tget filename() {\n\t\treturn this.#filename;\n\t}\n\tget text() {\n\t\treturn this.#text;\n\t}\n\tget length() {\n\t\treturn this.#text.length;\n\t}\n\tget lineCount() {\n\t\treturn this.#lineStarts.length;\n\t}\n\tlineStartOffsets() {\n\t\treturn this.#lineStarts;\n\t}\n\tlineStartOffset(line) {\n\t\tif (line <= 0) return 0;\n\t\treturn this.#lineStarts[line] ?? this.#text.length;\n\t}\n\tlineEndOffset(line) {\n\t\tif (line < 0) return 0;\n\t\tconst nextLineStart = this.#lineStarts[line + 1];\n\t\tif (nextLineStart === void 0) return this.#text.length;\n\t\tconst lineFeedOffset = nextLineStart - 1;\n\t\tconst carriageReturnOffset = lineFeedOffset - 1;\n\t\treturn this.#text.charCodeAt(carriageReturnOffset) === CARRIAGE_RETURN ? carriageReturnOffset : lineFeedOffset;\n\t}\n\tpositionAt(offset) {\n\t\tconst clamped = clamp(offset, 0, this.#text.length);\n\t\tconst line = this.#lineIndexAt(clamped);\n\t\treturn {\n\t\t\tline,\n\t\t\tcharacter: clamped - this.#lineStartAt(line)\n\t\t};\n\t}\n\toffsetAt(position) {\n\t\tconst line = clamp(position.line, 0, this.#lineStarts.length - 1);\n\t\tconst lineStart = this.#lineStartAt(line);\n\t\tconst lineEnd = this.#lineEndAt(line);\n\t\treturn clamp(lineStart + position.character, lineStart, lineEnd);\n\t}\n\toffsetToPslPosition(offset) {\n\t\tconst position = this.positionAt(offset);\n\t\treturn {\n\t\t\toffset,\n\t\t\tline: position.line + 1,\n\t\t\tcolumn: position.character + 1\n\t\t};\n\t}\n\trangeToPslSpan(range) {\n\t\treturn {\n\t\t\tstart: this.offsetToPslPosition(this.offsetAt(range.start)),\n\t\t\tend: this.offsetToPslPosition(this.offsetAt(range.end))\n\t\t};\n\t}\n\tpslSpanToRange(span) {\n\t\treturn {\n\t\t\tstart: this.positionAt(span.start.offset),\n\t\t\tend: this.positionAt(span.end.offset)\n\t\t};\n\t}\n\t#lineStartAt(line) {\n\t\treturn this.#lineStarts[line] ?? 0;\n\t}\n\t#lineEndAt(line) {\n\t\treturn line + 1 < this.#lineStarts.length ? this.#lineStartAt(line + 1) - 1 : this.#text.length;\n\t}\n\t#lineIndexAt(offset) {\n\t\tconst lineStarts = this.#lineStarts;\n\t\tlet low = 0;\n\t\tlet high = lineStarts.length - 1;\n\t\twhile (low < high) {\n\t\t\tconst mid = low + high + 1 >>> 1;\n\t\t\tif ((lineStarts[mid] ?? 0) <= offset) low = mid;\n\t\t\telse high = mid - 1;\n\t\t}\n\t\treturn low;\n\t}\n};\nvar PslSources = class PslSources {\n\t#sourcesByRoot = /* @__PURE__ */ new Map();\n\tconstructor(entries) {\n\t\tfor (const [root, sourceFile] of entries) this.#sourcesByRoot.set(root, sourceFile);\n\t}\n\t/**\n\t* A new registry uniting this one with `others` — e.g. the per-document\n\t* `PslSources` registries `parse()` returns for each member of a\n\t* multi-file schema, united into the one registry `buildSymbolTable` and\n\t* the interpreters expect.\n\t*/\n\tmerge(...others) {\n\t\treturn new PslSources([...this.#sourcesByRoot, ...others.flatMap((other) => [...other.#sourcesByRoot])]);\n\t}\n\tsourceFileNamed(filename) {\n\t\tlet match;\n\t\tfor (const sourceFile of this.#sourcesByRoot.values()) {\n\t\t\tif (sourceFile.filename !== filename) continue;\n\t\t\tif (match !== void 0 && match.text !== sourceFile.text) throw new InternalError(`Ambiguous PSL diagnostic filename \"${filename}\": registered sources have different text`);\n\t\t\tmatch = sourceFile;\n\t\t}\n\t\tif (match === void 0) throw new InternalError(`No SourceFile registered for PSL diagnostic filename \"${filename}\"`);\n\t\treturn match;\n\t}\n\tsourceFileFor(node) {\n\t\tconst root = node.root();\n\t\tconst sourceFile = this.#sourcesByRoot.get(root);\n\t\tif (sourceFile === void 0) throw new InternalError(\"No SourceFile registered for PSL syntax root\");\n\t\treturn sourceFile;\n\t}\n};\nfunction clamp(value, min, max) {\n\tif (value < min) return min;\n\tif (value > max) return max;\n\treturn value;\n}\n//#endregion\n//#region src/syntax/green.ts\nfunction greenToken(kind, text) {\n\treturn {\n\t\ttype: \"token\",\n\t\tkind,\n\t\ttext\n\t};\n}\nfunction greenNode(kind, children) {\n\tlet textLength = 0;\n\tfor (const child of children) textLength += child.type === \"token\" ? child.text.length : child.textLength;\n\treturn {\n\t\ttype: \"node\",\n\t\tkind,\n\t\tchildren,\n\t\ttextLength\n\t};\n}\n//#endregion\n//#region src/syntax/green-builder.ts\nvar GreenNodeBuilder = class {\n\t#stack = [];\n\tstartNode(kind) {\n\t\tthis.#stack.push({\n\t\t\tkind,\n\t\t\tchildren: []\n\t\t});\n\t}\n\ttoken(kind, text) {\n\t\tconst current = this.#stack.at(-1);\n\t\tif (!current) throw new InternalError(\"GreenNodeBuilder: token() called with no open node\");\n\t\tcurrent.children.push(greenToken(kind, text));\n\t}\n\tfinishNode() {\n\t\tconst completed = this.#stack.pop();\n\t\tif (!completed) throw new InternalError(\"GreenNodeBuilder: finishNode() called with no open node\");\n\t\tconst node = greenNode(completed.kind, completed.children);\n\t\tconst parent = this.#stack.at(-1);\n\t\tif (parent) parent.children.push(node);\n\t\treturn node;\n\t}\n};\n//#endregion\n//#region src/parse.ts\nconst TRIVIA_KINDS = /* @__PURE__ */ new Set([\n\t\"Whitespace\",\n\t\"Newline\",\n\t\"Comment\"\n]);\n/**\n* The fault-tolerant parser substrate the parse functions below drive. Trivia is flushed\n* into the enclosing open node, so every child node spans exactly its first\n* through last significant token.\n*/\nvar Cursor = class {\n\t#tokenizer;\n\t#sourceFile;\n\t#builder = new GreenNodeBuilder();\n\t#diagnostics = [];\n\t#offset = 0;\n\t#depth = 0;\n\tconstructor(filename, source) {\n\t\tthis.#tokenizer = new Tokenizer(source);\n\t\tthis.#sourceFile = new SourceFile(filename, source);\n\t}\n\tget diagnostics() {\n\t\treturn this.#diagnostics;\n\t}\n\tget sourceFile() {\n\t\treturn this.#sourceFile;\n\t}\n\tpeekKind(ahead = 0) {\n\t\treturn this.peekToken(ahead).kind;\n\t}\n\tpeekToken(ahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet remaining = ahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return token;\n\t\t\tif (TRIVIA_KINDS.has(token.kind)) {\n\t\t\t\trawIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (remaining === 0) return token;\n\t\t\tremaining--;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/** Span of the significant token `lookahead` positions ahead (`mark(0)` = the next). */\n\tmark(lookahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet offset = this.#offset;\n\t\tlet remaining = lookahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind) && remaining === 0) return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) remaining--;\n\t\t\toffset += token.text.length;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/**\n\t* Zero-width mark just past the last consumed significant token — anchors an\n\t* \"expected here\" diagnostic, e.g. the `{` missing after a declaration's name.\n\t*/\n\tmarkAfterLastToken() {\n\t\treturn {\n\t\t\toffset: this.#offset,\n\t\t\tlength: 0\n\t\t};\n\t}\n\tstartNode(kind) {\n\t\tif (this.#depth > 0) this.flushTrivia();\n\t\tthis.#builder.startNode(kind);\n\t\tthis.#depth++;\n\t}\n\tfinishNode() {\n\t\tthis.#depth--;\n\t\treturn this.#builder.finishNode();\n\t}\n\tbump() {\n\t\tthis.flushTrivia();\n\t\tconst token = this.#tokenizer.peek();\n\t\tif (token.kind === \"Eof\") return token;\n\t\tthis.#builder.token(token.kind, token.text);\n\t\tthis.#advance();\n\t\treturn token;\n\t}\n\trecoverToSyncPoint() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (token.kind === \"Eof\" || token.kind === \"Newline\" || token.kind === \"RBrace\") return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tflushTrivia() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tdiagnostic(code, message, mark) {\n\t\tconst start = mark.offset;\n\t\tconst end = start + mark.length;\n\t\tthis.#diagnostics.push({\n\t\t\tfilename: this.#sourceFile.filename,\n\t\t\tcode,\n\t\t\tmessage,\n\t\t\trange: {\n\t\t\t\tstart: this.#sourceFile.positionAt(start),\n\t\t\t\tend: this.#sourceFile.positionAt(end)\n\t\t\t}\n\t\t});\n\t}\n\t#advance() {\n\t\tthis.#offset += this.#tokenizer.next().text.length;\n\t}\n};\nfunction parseIdentifier(cursor) {\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Returns `undefined` when the next significant token does not start a\n* recognised expression, leaving recovery to the caller.\n*/\nfunction parseExpression(cursor) {\n\treturn parseStringLiteralExpr(cursor) ?? parseNumberLiteralExpr(cursor) ?? parseArrayLiteral(cursor) ?? parseObjectLiteralExpr(cursor) ?? parseTaggedLiteral(cursor) ?? parseFunctionCall(cursor) ?? parseBooleanLiteralExpr(cursor) ?? parseIdentifierExpr(cursor);\n}\n/** A string literal outside a tagged literal, where a backtick string is refused. */\nfunction parseStringLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"StringLiteral\") return void 0;\n\tif (cursor.peekToken().text.startsWith(\"`\")) cursor.diagnostic(\"PSL_BACKTICK_STRING_REQUIRES_TAG\", \"A backtick string must follow a tag, as in tag`...`.\", cursor.mark());\n\treturn parseStringLiteral(cursor);\n}\nfunction parseStringLiteral(cursor) {\n\tconst stringMark = cursor.mark();\n\tconst text = cursor.peekToken().text;\n\tcursor.startNode(\"StringLiteralExpr\");\n\tcursor.bump();\n\tif (!isTerminatedStringLiteral(text)) cursor.diagnostic(\"PSL_UNTERMINATED_STRING\", \"Unterminated string literal\", stringMark);\n\treturn cursor.finishNode();\n}\nfunction parseNumberLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"NumberLiteral\") return void 0;\n\tcursor.startNode(\"NumberLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\n/**\n* Parses a namespace-qualified name `[space ':']? Ident ('.' Ident)*`. The\n* caller guarantees a leading `Ident`.\n*\n* Parsing the whole chain up front lets a position decide\n* constructor-vs-reference by peeking exactly one token for `(`, with no scan of\n* the dotted chain's length.\n*/\nfunction parseQualifiedName(cursor) {\n\tcursor.startNode(\"QualifiedName\");\n\tparseIdentifier(cursor);\n\tparseQualifiedSegments(cursor, \"Colon\");\n\tparseQualifiedSegments(cursor, \"Dot\");\n\tcursor.finishNode();\n}\n/**\n* A well-formed name carries at most one colon space and one dot namespace, so\n* each separator past the first of its kind reports `PSL_INVALID_QUALIFIED_NAME`.\n* The separator is consumed regardless, keeping the lossless round-trip intact.\n*/\nfunction parseQualifiedSegments(cursor, separator) {\n\tlet seen = 0;\n\twhile (cursor.peekKind() === separator) {\n\t\tseen++;\n\t\tconst separatorMark = cursor.mark();\n\t\tcursor.bump();\n\t\tif (seen > 1) cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name has too many segments\", separatorMark);\n\t\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\t\telse cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name is missing a name after the separator\", cursor.mark());\n\t}\n}\n/**\n* Whether the next tokens open a tagged literal: a bare `Ident` or a\n* namespace-qualified `Ident.Ident`, then a string. Trivia may sit anywhere\n* between them. Bounded like {@link isCallAhead}.\n*/\nfunction isTaggedLiteralAhead(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return false;\n\tif (cursor.peekKind(1) === \"StringLiteral\") return true;\n\treturn cursor.peekKind(1) === \"Dot\" && cursor.peekKind(2) === \"Ident\" && cursor.peekKind(3) === \"StringLiteral\";\n}\n/** Parses `` tag`body` ``, `tag\"body\"`, or `tag'body'`: a qualified name, then a string literal. */\nfunction parseTaggedLiteral(cursor) {\n\tif (!isTaggedLiteralAhead(cursor)) return void 0;\n\tcursor.startNode(\"TaggedLiteral\");\n\tparseQualifiedName(cursor);\n\tparseStringLiteral(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseBooleanLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst text = cursor.peekToken().text;\n\tif (text !== \"true\" && text !== \"false\") return void 0;\n\tcursor.startNode(\"BooleanLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseIdentifierExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseArrayLiteral(cursor) {\n\tif (cursor.peekKind() !== \"LBracket\") return void 0;\n\tcursor.startNode(\"ArrayLiteral\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBracket\" && cursor.peekKind() !== \"Eof\") {\n\t\tif (!parseExpression(cursor)) break;\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseObjectLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"LBrace\") return void 0;\n\tconst braceMark = cursor.mark();\n\tcursor.startNode(\"ObjectLiteralExpr\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBrace\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseObjectField(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse if (cursor.peekKind() === \"Ident\") cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected \\\",\\\" between object-literal fields\", cursor.markAfterLastToken());\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Unterminated object literal\", braceMark);\n\treturn cursor.finishNode();\n}\nfunction parseObjectField(cursor) {\n\tcursor.startNode(\"ObjectField\");\n\tconst keyMark = cursor.mark();\n\tconst keyText = cursor.peekToken().text;\n\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\telse if (cursor.peekKind() === \"StringLiteral\") parseStringLiteralExpr(cursor);\n\tif (cursor.peekKind() === \"Colon\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected a value after \\\":\\\"\", cursor.mark());\n\t} else {\n\t\tcursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", `Expected \":\" after \"${keyText}\"`, keyMark);\n\t\tif (!(cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\")) parseExpression(cursor);\n\t}\n\treturn cursor.finishNode();\n}\n/**\n* Whether the next tokens open a call: a bare `Ident(` or a namespace-qualified\n* `Ident.Ident(`. The lookahead is deliberately bounded so a bare dotted\n* reference like `a.b` is not mistaken for a call, rather than scanning an\n* unbounded dotted chain ahead to find the paren.\n*/\nfunction isCallAhead(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return false;\n\tif (cursor.peekKind(1) === \"LParen\") return true;\n\treturn cursor.peekKind(1) === \"Dot\" && cursor.peekKind(2) === \"Ident\" && cursor.peekKind(3) === \"LParen\";\n}\n/**\n* Parses a function/constructor call — bare `autoincrement()` or qualified\n* `temporal.updatedAt()`. Returns `undefined` unless {@link isCallAhead}\n* confirms a trailing `(`, so the `parseExpression` chain falls through to the\n* boolean and bare-identifier forms.\n*/\nfunction parseFunctionCall(cursor) {\n\tif (!isCallAhead(cursor)) return void 0;\n\tcursor.startNode(\"FunctionCall\");\n\tparseQualifiedName(cursor);\n\tif (cursor.peekKind() === \"LParen\") parseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\n/** Parses a parenthesised, comma-separated `AttributeArg` list into the currently open node. */\nfunction parseParenArgs(cursor) {\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RParen\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseAttributeArg(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RParen\") cursor.bump();\n}\nfunction parseAttributeArg(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"StringLiteral\" && kind !== \"NumberLiteral\" && kind !== \"LBracket\" && kind !== \"LBrace\") return;\n\tcursor.startNode(\"AttributeArg\");\n\tif (cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\") {\n\t\tparseIdentifier(cursor);\n\t\tcursor.bump();\n\t}\n\tparseArgValue(cursor);\n\tcursor.finishNode();\n}\nfunction parseArgValue(cursor) {\n\tparseExpression(cursor);\n}\nfunction parseAttributeArgList(cursor) {\n\tcursor.startNode(\"AttributeArgList\");\n\tparseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseAttribute(cursor) {\n\tconst isBlockAttribute = cursor.peekKind() === \"DoubleAt\";\n\tconst attributeMark = cursor.mark();\n\tcursor.startNode(isBlockAttribute ? \"ModelAttribute\" : \"FieldAttribute\");\n\tcursor.bump();\n\tif (cursor.peekKind() === \"Ident\") parseQualifiedName(cursor);\n\telse cursor.diagnostic(\"PSL_INVALID_ATTRIBUTE_SYNTAX\", \"Attribute name expected\", attributeMark);\n\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A type annotation: `QualifiedName (argList)? ([])? (?)?`, e.g.\n* `pgvector.Vector(1536)[]?`. When the field has no type, no node is emitted —\n* a missing type is the absence of a `TypeAnnotation`, not a zero-width one.\n*/\nfunction parseTypeAnnotation(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"LBracket\" && kind !== \"Question\") return;\n\tcursor.startNode(\"TypeAnnotation\");\n\tif (cursor.peekKind() === \"Ident\") {\n\t\tparseQualifiedName(cursor);\n\t\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\t}\n\tif (cursor.peekKind() === \"LBracket\") {\n\t\tcursor.bump();\n\t\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\t}\n\tif (cursor.peekKind() === \"Question\") cursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Parses a full PSL document. Never throws — malformed input yields diagnostics\n* and a recovered tree, not an exception.\n*/\nfunction parse(source, filename) {\n\tconst cursor = new Cursor(filename, source);\n\tconst root = createSyntaxTree(parseDocument(cursor));\n\tconst document = DocumentAst.cast(root) ?? new DocumentAst(root);\n\tconst sources = new PslSources([[document.syntax, cursor.sourceFile]]);\n\treturn {\n\t\tdocument,\n\t\tdiagnostics: cursor.diagnostics,\n\t\tsources\n\t};\n}\nfunction parseDocument(cursor) {\n\tcursor.startNode(\"Document\");\n\twhile (cursor.peekKind() !== \"Eof\") parseDeclaration(cursor, false);\n\tcursor.flushTrivia();\n\treturn cursor.finishNode();\n}\nconst RESERVED_BLOCK_KEYWORDS = /* @__PURE__ */ new Set([\n\t\"model\",\n\t\"namespace\",\n\t\"type\",\n\t\"types\"\n]);\nfunction keywordIs(cursor, keyword) {\n\treturn cursor.peekKind() === \"Ident\" && cursor.peekToken().text === keyword;\n}\n/**\n* Each alternative is a no-op on non-match, consuming nothing, so the\n* forward-only cursor is never left half-consumed by a rejected alternative.\n* Recovery runs via the `if (!node)` tail rather than as a `??` arm, because it\n* appends raw tokens to the open parent instead of returning a child node.\n*/\nfunction parseDeclaration(cursor, insideNamespace) {\n\tconst name = cursor.peekKind(1) === \"Ident\" ? cursor.peekToken(1).text : \"\";\n\tif (insideNamespace && keywordIs(cursor, \"namespace\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Recursive \"namespace ${name}\" block is not allowed; namespace blocks may not nest`, cursor.mark());\n\telse if (insideNamespace && keywordIs(cursor, \"types\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", \"`types` blocks must be declared at the document top level, not inside a namespace block\", cursor.mark());\n\telse if (keywordIs(cursor, \"namespace\") && name === UNSPECIFIED_PSL_NAMESPACE_ID) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Namespace name \"${UNSPECIFIED_PSL_NAMESPACE_ID}\" is reserved for the parser-synthesised bucket for top-level declarations`, cursor.mark(1));\n\tif (!(parseModel(cursor) ?? parseNamespace(cursor) ?? parseCompositeType(cursor) ?? parseTypesBlock(cursor) ?? parseGenericBlock(cursor))) parseUnsupportedTopLevel(cursor);\n}\n/**\n* Reports only the first missing piece — a missing name suppresses the\n* missing-brace diagnostic. `nameRequired` is false only for the `types` block.\n*/\nfunction parseBlock(cursor, kind, nameRequired, parseMember) {\n\tconst keyword = cursor.peekToken().text;\n\tconst keywordMark = cursor.mark();\n\tcursor.startNode(kind);\n\tcursor.bump();\n\tconst hasName = nameRequired && cursor.peekKind() === \"Ident\";\n\tif (hasName) parseIdentifier(cursor);\n\tif (nameRequired && !hasName) cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected a name after \"${keyword}\"`, keywordMark);\n\telse if (cursor.peekKind() !== \"LBrace\") cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, parseMember);\n\telse cursor.recoverToSyncPoint();\n\treturn cursor.finishNode();\n}\nfunction parseModel(cursor) {\n\tif (!keywordIs(cursor, \"model\")) return void 0;\n\treturn parseBlock(cursor, \"ModelDeclaration\", true, parseModelMember);\n}\n/**\n* Excluding the reserved keywords keeps a malformed reserved block (e.g. `model\n* {` with no name) routed to its dedicated parser. The generic keyword set is\n* open, so a bare identifier with no brace (e.g. `oops`) is read as an unfinished\n* custom declaration rather than unsupported content.\n*/\nfunction parseGenericBlock(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst keyword = cursor.peekToken().text;\n\tif (RESERVED_BLOCK_KEYWORDS.has(keyword)) return void 0;\n\tconst hasName = cursor.peekKind(1) === \"Ident\" && cursor.peekKind(2) === \"LBrace\";\n\tcursor.startNode(\"GenericBlockDeclaration\");\n\tcursor.bump();\n\tif (hasName) parseIdentifier(cursor);\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, genericBlockMemberParser(keyword));\n\telse {\n\t\tcursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\t\tcursor.recoverToSyncPoint();\n\t}\n\treturn cursor.finishNode();\n}\nfunction parseNamespace(cursor) {\n\tif (!keywordIs(cursor, \"namespace\")) return void 0;\n\treturn parseBlock(cursor, \"Namespace\", true, (inner) => parseDeclaration(inner, true));\n}\nfunction parseCompositeType(cursor) {\n\tif (!keywordIs(cursor, \"type\")) return void 0;\n\treturn parseBlock(cursor, \"CompositeTypeDeclaration\", true, parseModelMember);\n}\n/** `types` (plural) is the no-name types block; the singular `type` is the composite type above. */\nfunction parseTypesBlock(cursor) {\n\tif (!keywordIs(cursor, \"types\")) return void 0;\n\treturn parseBlock(cursor, \"TypesBlock\", false, parseNamedTypeMember);\n}\n/** Every `parseMember` consumes at least one significant token, so the loop always terminates. */\nfunction parseBlockBody(cursor, parseMember) {\n\tconst braceMark = cursor.mark();\n\tcursor.bump();\n\tfor (;;) {\n\t\tconst kind = cursor.peekKind();\n\t\tif (kind === \"RBrace\" || kind === \"Eof\") break;\n\t\tparseMember(cursor);\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_UNTERMINATED_BLOCK\", \"Unterminated block declaration\", braceMark);\n}\nfunction parseUnsupportedTopLevel(cursor) {\n\tconst offending = cursor.peekToken().text;\n\tconst message = cursor.peekKind(1) === \"LBrace\" ? `Unsupported top-level block \"${offending}\"` : `Unsupported top-level declaration \"${offending}\"`;\n\tcursor.diagnostic(\"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\", message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\n/**\n* Matches a leading `@@` block attribute, a no-op otherwise. Single-`@`\n* attributes belong to fields and are parsed inside `parseField`.\n*/\nfunction parseBlockAttribute(cursor) {\n\tif (cursor.peekKind() !== \"DoubleAt\") return void 0;\n\treturn parseAttribute(cursor);\n}\nfunction parseModelMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseField(cursor))) invalidMember(cursor, \"PSL_INVALID_MODEL_MEMBER\", `Invalid model member declaration \"${cursor.peekToken().text}\"`);\n}\nfunction parseNamedTypeMember(cursor) {\n\tif (!parseNamedType(cursor)) invalidMember(cursor, \"PSL_INVALID_TYPES_MEMBER\", `Invalid types declaration \"${cursor.peekToken().text}\"`);\n}\n/**\n* A `view` body is read like a model body. Every other generic block reads `key = value` entries\n* and bare keys, and in an `enum` block those may carry `@` attributes (`USER @map(\"user\")`). Each\n* interpreter decides whether it accepts the block and its members.\n*/\nfunction genericBlockMemberParser(keyword) {\n\tif (keyword === \"view\") return parseModelMember;\n\tif (keyword === \"enum\") return parseEnumMember;\n\treturn parseKeyValueMember;\n}\n/**\n* A generic-block member is either a `@@`-block attribute or a `key = value`\n* entry. The block-attribute alternative is purely syntactic — it does not judge\n* whether the attribute is valid for the block's kind.\n*/\nfunction parseKeyValueMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor))) invalidMember(cursor, \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Invalid block entry\");\n}\nfunction parseEnumMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor, { memberAttributes: true }))) invalidMember(cursor, \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Invalid block entry\");\n}\nfunction invalidMember(cursor, code, message) {\n\tcursor.diagnostic(code, message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\nfunction parseField(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"FieldDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() !== \"Ident\") cursor.diagnostic(\"PSL_INVALID_MODEL_MEMBER\", `Expected a type after field \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseNamedType(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"NamedTypeDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_TYPES_MEMBER\", `Expected \"=\" after \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A generic-block entry is either `key = value` or a bare `key` (committing a\n* `KeyValuePair` carrying only the key). With `memberAttributes` (enum blocks) any number of `@`\n* attributes may follow, as in `USER @map(\"user\")`. A `key =` with no following expression is\n* flagged.\n*/\nfunction parseKeyValue(cursor, options = { memberAttributes: false }) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"KeyValuePair\");\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Expected a value after \\\"=\\\"\", cursor.mark());\n\t}\n\twhile (options.memberAttributes && cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\n//#endregion\nexport { PslSources as a, greenToken as i, GreenNodeBuilder as n, SourceFile as o, greenNode as r, parse as t };\n\n//# sourceMappingURL=parse-CfZKsx8i.mjs.map"],"mappings":";;;;;;AAMA,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAClB,IAAI,aAAa,MAAM;CACtB;CACA;CACA;CACA,YAAY,UAAU,MAAM;EAC3B,KAAKA,YAAY;EACjB,KAAKC,QAAQ;EACb,MAAM,aAAa,CAAC,CAAC;EACrB,KAAK,IAAI,SAAS,GAAG,SAAS,KAAK,QAAQ,UAAU,IAAI,KAAK,WAAW,MAAM,MAAM,WAAW,WAAW,KAAK,SAAS,CAAC;EAC1H,KAAKC,cAAc;CACpB;CACA,IAAI,WAAW;EACd,OAAO,KAAKF;CACb;CACA,IAAI,OAAO;EACV,OAAO,KAAKC;CACb;CACA,IAAI,SAAS;EACZ,OAAO,KAAKA,MAAM;CACnB;CACA,IA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C;CACpC,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,UAAU,OAAO,KAAK;MAC3C,OAAO,WAAW,4BAA4B,uBAAuB,SAAS,IAAI,QAAQ;CAC/F,oBAAoB,MAAM;CAC1B,OAAO,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACxD,OAAO,OAAO,WAAW;AAC1B;;;;;;;AAOA,SAAS,cAAc,QAAQ,UAAU,EAAE,kBAAkB,MAAM,GAAG;CACrE,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,KAAK;CAC/C,OAAO,UAAU,cAAc;CAC/B,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,UAAU;EACnC,OAAO,KAAK;EACZ,IAAI,CAAC,gBAAgB,MAAM,GAAG,OAAO,WAAW,sCAAsC,gCAAgC,OAAO,KAAK,CAAC;CACpI;CACA,OAAO,QAAQ,oBAAoB,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACpF,OAAO,OAAO,WAAW;AAC1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $ as PslSpan } from "./framework-authoring-AkdL38SR-DRSNWmJT.mjs";
|
|
2
|
-
import { vt as TaggedLiteralCanonicalization } from "./control-
|
|
2
|
+
import { vt as TaggedLiteralCanonicalization } from "./control-CuhULO0T.mjs";
|
|
3
3
|
import "./psl-ast-C90I4nkm.mjs";
|
|
4
|
-
import { r as ContractSourceDiagnostic } from "./config-types-
|
|
4
|
+
import { r as ContractSourceDiagnostic } from "./config-types-7cVcsDOV.mjs";
|
|
5
5
|
import { n as TokenKind, t as Token } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
6
6
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/parse-DZRO_CK2.d.mts
|
|
7
7
|
//#region src/syntax/syntax-kind.d.ts
|
|
@@ -490,4 +490,4 @@ interface ParseResult {
|
|
|
490
490
|
declare function parse(source: string, filename: string): ParseResult;
|
|
491
491
|
//#endregion
|
|
492
492
|
export { createPslDiagnosticCollector as $, ObjectFieldAst as A, SourceFile as B, KeyValuePairAst as C, NamespaceDeclarationAst as D, NamedTypeDeclarationAst as E, PslDiagnostic as F, SyntaxNode as G, StringLiteralQuote as H, PslDiagnosticCollector as I, TokenAtOffset as J, SyntaxToken as K, PslSources as L, ParseDiagnostic as M, ParseResult as N, NamespaceMemberAst as O, Position as P, castExpression as Q, QualifiedNameAst as R, IdentifierAst as S, ModelDeclarationAst as T, SyntaxElement as U, StringLiteralExprAst as V, SyntaxKind as W, TypesBlockAst as X, TypeAnnotationAst as Y, any as Z, GenericBlockDeclarationAst as _, AttributeAst as a, findFirstChild as at, GreenNode as b, BracedBlock as c, mapPslDiagnostics as ct, DiagnosticSource as d, createSyntaxTree as et, DocumentAst as f, FunctionCallAst as g, FieldDeclarationAst as h, AttributeArgListAst as i, findChildToken as it, ObjectLiteralExprAst as j, NumberLiteralExprAst as k, CompositeTypeDeclarationAst as l, parse as lt, FieldAttributeAst as m, AstNode as n, diagnosticSource as nt, BlockMemberAst as o, greenNode as ot, ExpressionAst as p, TaggedLiteralExprAst as q, AttributeArgAst as r, filterChildren as rt, BooleanLiteralExprAst as s, greenToken as st, ArrayLiteralAst as t, diagnosticFromSpan as tt, DeclarationAst as u, printSyntax as ut, GenericBlockMemberAst as v, ModelAttributeAst as w, GreenToken as x, GreenElement as y, Range as z };
|
|
493
|
-
//# sourceMappingURL=parse-DZRO_CK2-
|
|
493
|
+
//# sourceMappingURL=parse-DZRO_CK2-BtDklsaV.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-DZRO_CK2-
|
|
1
|
+
{"version":3,"file":"parse-DZRO_CK2-BtDklsaV.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-DZRO_CK2.d.mts"],"mappings":";;;;;;;KAKK;;;UAGK;WACC;WACA,MAAM;WACN;;UAED;WACC;WACA,MAAM;WACN,UAAU,cAAc;WACxB;;KAEN,eAAe,Y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MAAM,aAAa;;cAEnB,2BAA2B;WAC9B,QAAQ;EACjB,YAAY,QAAQ;EACpB,OAAO;EACP,UAAU;EACV,SAAS;;EAET,cAAc,SAAS;SAChB,KAAK,MAAM,aAAa;;cAEnB,+BAA+B;WAClC,QAAQ;EACjB,YAAY,QAAQ;EACpB,QAAQ;EACR,kBAAkB;EAClB,cAAc,SAAS;SAChB,KAAK,MAAM,aAAa;;cAEnB,mCAAmC;WACtC,QAAQ;EACjB,YAAY,QAAQ;EACpB,QAAQ;EACR,UAAU;EACV,kBAAkB;EAClB,cAAc,SAAS;SAChB,KAAK,MAAM,aAAa;;;;KAI5B,kBAAkB;UACb;WACC,UAAU;WACV,sBAAsB;WACtB,SAAS;;;;;;iBAMH,MAAM,gBAAgB,mBAAmB"}
|
package/dist/psl-parser.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { V as JsonValue } from "./domain-envelope-gHv58hD1-B8mta2A6.mjs";
|
|
2
2
|
import { $ as PslSpan, A as AuthoringTypeNamespace, C as AuthoringPslBlockDescriptor, G as ParsedPslExtensionBlock, J as PslExtensionBlockAttribute, K as PslDiagnosticCode, O as AuthoringTypeConstructorDescriptor, P as ControlDefaultRegistries, Q as PslPosition, X as PslExtensionBlockParsedAttribute, Y as PslExtensionBlockAttributeArg, Z as PslExtensionBlockPrintEntry, q as PslExtensionBlock, w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-AkdL38SR-DRSNWmJT.mjs";
|
|
3
|
-
import "./authoring-
|
|
3
|
+
import "./authoring-BfEjYZpO.mjs";
|
|
4
4
|
import { C as PslTypesBlock, O as flatPslModels, S as PslTypeConstructorCall, _ as PslModelAttribute, a as PslAttributePositionalArgument, c as PslDefaultFunctionValue, f as PslDocumentAst, g as PslModel, i as PslAttributeNamedArgument, j as namespacePslExtensionBlocks, l as PslDefaultLiteralValue, m as PslFieldAttribute, n as PslAttribute, o as PslAttributeTarget, p as PslField, r as PslAttributeArgument, s as PslCompositeType, u as PslDefaultValue, v as PslNamedTypeDeclaration, y as PslNamespace } from "./psl-ast-BjC549ky-CD7J2H0j.mjs";
|
|
5
5
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
6
|
-
import { n as AssembledAuthoringContributions, vt as TaggedLiteralCanonicalization } from "./control-
|
|
6
|
+
import { n as AssembledAuthoringContributions, vt as TaggedLiteralCanonicalization } from "./control-CuhULO0T.mjs";
|
|
7
7
|
import "./psl-ast-C90I4nkm.mjs";
|
|
8
8
|
import { i as isPslIdentifier } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
9
|
-
import { $ as createPslDiagnosticCollector, F as PslDiagnostic, G as SyntaxNode, I as PslDiagnosticCollector, L as PslSources, M as ParseDiagnostic, ct as mapPslDiagnostics, d as DiagnosticSource, m as FieldAttributeAst, n as AstNode, nt as diagnosticSource, p as ExpressionAst, r as AttributeArgAst, tt as diagnosticFromSpan, w as ModelAttributeAst } from "./parse-DZRO_CK2-
|
|
10
|
-
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedConstructorCall, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as readResolvedAttribute, y as readResolvedAttributes } from "./symbol-table-ikmivfwq-
|
|
9
|
+
import { $ as createPslDiagnosticCollector, F as PslDiagnostic, G as SyntaxNode, I as PslDiagnosticCollector, L as PslSources, M as ParseDiagnostic, ct as mapPslDiagnostics, d as DiagnosticSource, m as FieldAttributeAst, n as AstNode, nt as diagnosticSource, p as ExpressionAst, r as AttributeArgAst, tt as diagnosticFromSpan, w as ModelAttributeAst } from "./parse-DZRO_CK2-BtDklsaV.mjs";
|
|
10
|
+
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedConstructorCall, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as readResolvedAttribute, y as readResolvedAttributes } from "./symbol-table-ikmivfwq-u2--jZQG.mjs";
|
|
11
11
|
import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
|
|
12
12
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
|
|
13
13
|
//#region src/attribute-helpers.d.ts
|
package/dist/psl-parser.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
2
|
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
3
|
import { a as or, i as okVoid, n as notOk, r as ok, t as and } from "./result-8OXF26MN.mjs";
|
|
4
|
-
import { _ as isAuthoringModelAttributeDescriptor, v as isAuthoringPslBlockDescriptor, y as isAuthoringTypeConstructorDescriptor } from "./temporal-presets-
|
|
4
|
+
import { _ as isAuthoringModelAttributeDescriptor, v as isAuthoringPslBlockDescriptor, y as isAuthoringTypeConstructorDescriptor } from "./temporal-presets-MavBeaJC-BcqWVoBB.mjs";
|
|
5
5
|
import { a as flatPslModels, c as namespacePslExtensionBlocks } from "./psl-ast-CyvE6CR-.mjs";
|
|
6
6
|
import { n as isPslIdentifier } from "./tokenizer-BMz7z2KR-J0yZ4im3.mjs";
|
|
7
|
-
import { S as TaggedLiteralExprAst, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, w as TypesBlockAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-BrSntcPa-
|
|
7
|
+
import { S as TaggedLiteralExprAst, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, w as TypesBlockAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-BrSntcPa-BUYk6wxW.mjs";
|
|
8
8
|
import { a as mapPslDiagnostics, c as readResolvedAttributes, i as keywordPslSpan, l as readResolvedConstructorCall, n as diagnosticFromSpan, o as nodePslSpan, r as diagnosticSource, s as readResolvedAttribute, t as createPslDiagnosticCollector } from "./resolve-GE34dgM6-D33m6YEw.mjs";
|
|
9
9
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.mjs
|
|
10
10
|
function getPositionalArgument(attribute, index = 0) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
2
2
|
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
3
|
import { t as SyntaxNode } from "./ast-helpers-2XRnkQEO-BxG5qx3Q.mjs";
|
|
4
|
-
import { a as CompositeTypeDeclarationAst, c as FieldDeclarationAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, m as ModelDeclarationAst, p as ModelAttributeAst, u as GenericBlockDeclarationAst, w as TypesBlockAst } from "./declarations-BrSntcPa-
|
|
5
|
-
import { o as parse } from "./parse-CfZKsx8i-
|
|
4
|
+
import { a as CompositeTypeDeclarationAst, c as FieldDeclarationAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, m as ModelDeclarationAst, p as ModelAttributeAst, u as GenericBlockDeclarationAst, w as TypesBlockAst } from "./declarations-BrSntcPa-BUYk6wxW.mjs";
|
|
5
|
+
import { o as parse } from "./parse-CfZKsx8i-DpxGIwhF.mjs";
|
|
6
6
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/format.mjs
|
|
7
7
|
function emitDocument(document, indentUnit, newline) {
|
|
8
8
|
const writer = new LineWriter(indentUnit, newline);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as Contract } from "./contract-types-Cdqr65a--BsYwlpQo.mjs";
|
|
2
|
-
import { $ as PslSpan, ft as instantiateAuthoringFieldPreset, m as AuthoringFieldPresetDescriptor, n as AuthoringArgumentDescriptor, w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-AkdL38SR-DRSNWmJT.mjs";
|
|
3
|
-
import "./authoring-
|
|
2
|
+
import { $ as PslSpan, a as AuthoringContributions, ft as instantiateAuthoringFieldPreset, m as AuthoringFieldPresetDescriptor, n as AuthoringArgumentDescriptor, w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-AkdL38SR-DRSNWmJT.mjs";
|
|
3
|
+
import "./authoring-BfEjYZpO.mjs";
|
|
4
4
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
5
5
|
import "./psl-ast-C90I4nkm.mjs";
|
|
6
|
-
import { c as ContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic } from "./config-types-
|
|
7
|
-
import { F as PslDiagnostic, I as PslDiagnosticCollector, L as PslSources, d as DiagnosticSource, f as DocumentAst } from "./parse-DZRO_CK2-
|
|
8
|
-
import { d as ResolvedTypeConstructorCall, f as SymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, t as BlockSymbol } from "./symbol-table-ikmivfwq-
|
|
6
|
+
import { c as ContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic } from "./config-types-7cVcsDOV.mjs";
|
|
7
|
+
import { F as PslDiagnostic, I as PslDiagnosticCollector, L as PslSources, d as DiagnosticSource, f as DocumentAst } from "./parse-DZRO_CK2-BtDklsaV.mjs";
|
|
8
|
+
import { d as ResolvedTypeConstructorCall, f as SymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, t as BlockSymbol } from "./symbol-table-ikmivfwq-u2--jZQG.mjs";
|
|
9
9
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
|
|
10
10
|
//#region src/authoring-arguments.d.ts
|
|
11
11
|
declare function mapPslHelperArgs(input: {
|
|
@@ -47,6 +47,7 @@ declare function reportUnknownFieldPreset(input: {
|
|
|
47
47
|
readonly entityLabel: string;
|
|
48
48
|
readonly namespace: string;
|
|
49
49
|
readonly helperPath: string;
|
|
50
|
+
readonly authoringContributions: AuthoringContributions | undefined;
|
|
50
51
|
readonly source: DiagnosticSource;
|
|
51
52
|
readonly span: PslSpan;
|
|
52
53
|
readonly diagnostics: PslDiagnosticCollector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser__interpret.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts"],"mappings":";;;;;;;;;;iBAQiB,iBAAiB;WACvB,eAAe;WACf,sBAAsB;WACtB;WACA,MAAM;WACN,aAAa;WACb,QAAQ;WACR;;;;iBAIM,+BAA+B,WAAW,aAAa,SAAS,aAAa;;;;;;;;iBAQ7E,8BAA8B;WACpC;WACA;WACA,QAAQ;WACR,MAAM;IACb;iBACa,0BAA0B;WAChC;WACA;WACA,QAAQ;WACR,MAAM;WACN,aAAa;;;;;iBAKP,yBAAyB;WAC/B;WACA;WACA;WACA,QAAQ;WACR,MAAM;WACN,aAAa;;;;;;;iBAOP,0BAA0B;WAChC,MAAM;WACN,YAAY;WACZ,aAAa;WACb,QAAQ;WACR;IACP,kBAAkB;;;;;;;;UAQZ;WACC,oBAAoB;WACpB,SAAS;WACT,aAAa;;;;;;;;UAQd,4BAA4B;EACpC,UAAU,OAAO,mBAAmB,SAAS,wBAAwB,OAAO,UAAU;;;;;;;;iBAQvE,oBAAoB,QAAQ,OAAO,UAAU,4BAA4B,0BAA0B,6BAA6B,OAAO,UAAU;;iBAEjJ,kBAAkB,QAAQ,yBAAyB,UAAU;;;;;;;;KAQzE;WACM;WACA;;iBAEM,kBAAkB,4BAA4B;;;;;;iBAM9C,wBAAwB;WAC9B;GACR,iBAAiB,mBAAmB;iBACtB,uCAAuC;WAC7C;WACA,OAAO;WACP;WACA,SAAS;WACT;IACP;;;;iBAIa,qBAAqB,aAAa,mDAAmD;iBACrF,2BAA2B,OAAO,aAAa,SAAS,aAAa"}
|
|
1
|
+
{"version":3,"file":"psl-parser__interpret.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts"],"mappings":";;;;;;;;;;iBAQiB,iBAAiB;WACvB,eAAe;WACf,sBAAsB;WACtB;WACA,MAAM;WACN,aAAa;WACb,QAAQ;WACR;;;;iBAIM,+BAA+B,WAAW,aAAa,SAAS,aAAa;;;;;;;;iBAQ7E,8BAA8B;WACpC;WACA;WACA,QAAQ;WACR,MAAM;IACb;iBACa,0BAA0B;WAChC;WACA;WACA,QAAQ;WACR,MAAM;WACN,aAAa;;;;;iBAKP,yBAAyB;WAC/B;WACA;WACA;WACA,wBAAwB;WACxB,QAAQ;WACR,MAAM;WACN,aAAa;;;;;;;iBAOP,0BAA0B;WAChC,MAAM;WACN,YAAY;WACZ,aAAa;WACb,QAAQ;WACR;IACP,kBAAkB;;;;;;;;UAQZ;WACC,oBAAoB;WACpB,SAAS;WACT,aAAa;;;;;;;;UAQd,4BAA4B;EACpC,UAAU,OAAO,mBAAmB,SAAS,wBAAwB,OAAO,UAAU;;;;;;;;iBAQvE,oBAAoB,QAAQ,OAAO,UAAU,4BAA4B,0BAA0B,6BAA6B,OAAO,UAAU;;iBAEjJ,kBAAkB,QAAQ,yBAAyB,UAAU;;;;;;;;KAQzE;WACM;WACA;;iBAEM,kBAAkB,4BAA4B;;;;;;iBAM9C,wBAAwB;WAC9B;GACR,iBAAiB,mBAAmB;iBACtB,uCAAuC;WAC7C;WACA,OAAO;WACP;WACA,SAAS;WACT;IACP;;;;iBAIa,qBAAqB,aAAa,mDAAmD;iBACrF,2BAA2B,OAAO,aAAa,SAAS,aAAa"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as notOk } from "./result-8OXF26MN.mjs";
|
|
2
|
-
import { f as instantiateAuthoringFieldPreset, j as validateAuthoringHelperArguments, v as isAuthoringPslBlockDescriptor } from "./temporal-presets-
|
|
2
|
+
import { f as instantiateAuthoringFieldPreset, j as validateAuthoringHelperArguments, v as isAuthoringPslBlockDescriptor } from "./temporal-presets-MavBeaJC-BcqWVoBB.mjs";
|
|
3
|
+
import { n as fieldPresetSpellings } from "./authoring-CL-ZB448.mjs";
|
|
3
4
|
import { i as keywordPslSpan, o as nodePslSpan, r as diagnosticSource } from "./resolve-GE34dgM6-D33m6YEw.mjs";
|
|
4
5
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs
|
|
5
6
|
function unquoteStringLiteral(value) {
|
|
@@ -328,9 +329,11 @@ function reportUncomposedNamespace(input) {
|
|
|
328
329
|
* Pushes the canonical `PSL_UNKNOWN_FIELD_PRESET` diagnostic when a typoed preset name is referenced inside a registered field-preset namespace. The `data` payload exposes the namespace and full helper path so machine consumers (agents, IDE extensions) don't have to parse the prose.
|
|
329
330
|
*/
|
|
330
331
|
function reportUnknownFieldPreset(input) {
|
|
332
|
+
const presets = fieldPresetSpellings(input.authoringContributions, input.namespace);
|
|
333
|
+
const listed = presets.length === 0 ? "no field presets" : presets.length === 1 ? presets.join("") : `${presets.slice(0, -1).join(", ")} and ${presets.at(-1)}`;
|
|
331
334
|
input.diagnostics.push({
|
|
332
335
|
code: "PSL_UNKNOWN_FIELD_PRESET",
|
|
333
|
-
message: `${input.entityLabel} references unknown field preset "${input.helperPath}".
|
|
336
|
+
message: `${input.entityLabel} references unknown field preset "${input.helperPath}". The "${input.namespace}" namespace has ${listed}.`,
|
|
334
337
|
...input.source.at(input.span),
|
|
335
338
|
data: {
|
|
336
339
|
namespace: input.namespace,
|
|
@@ -362,7 +365,7 @@ function instantiatePslFieldPreset(input) {
|
|
|
362
365
|
const message = error instanceof Error ? error.message : String(error);
|
|
363
366
|
input.diagnostics.push({
|
|
364
367
|
code: "PSL_INVALID_ATTRIBUTE_ARGUMENT",
|
|
365
|
-
message: `${input.entityLabel}
|
|
368
|
+
message: `${input.entityLabel}: ${message}`,
|
|
366
369
|
...input.source.at(input.call.span)
|
|
367
370
|
});
|
|
368
371
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser__interpret.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs"],"sourcesContent":["import { c as diagnosticSource, n as nodePslSpan, t as keywordPslSpan } from \"./resolve-GE34dgM6.mjs\";\nimport { instantiateAuthoringFieldPreset, isAuthoringPslBlockDescriptor, validateAuthoringHelperArguments } from \"@internal/framework-components/authoring\";\nimport { notOk } from \"@internal/utils/result\";\n//#region src/authoring-arguments.ts\nfunction unquoteStringLiteral(value) {\n\tconst trimmed = value.trim();\n\tconst match = trimmed.match(/^(['\"])(.*)\\1$/);\n\tif (!match) return trimmed;\n\treturn match[2] ?? \"\";\n}\nconst INVALID_AUTHORING_ARGUMENT = Symbol(\"invalidAuthoringArgument\");\nfunction isIdentifierStartCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z_$]/.test(character);\n}\nfunction isIdentifierCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z0-9_$]/.test(character);\n}\nfunction parseJsLikeLiteral(value) {\n\tlet index = 0;\n\tfunction skipWhitespace() {\n\t\twhile (/\\s/.test(value[index] ?? \"\")) index += 1;\n\t}\n\tfunction parseIdentifier() {\n\t\tconst first = value[index];\n\t\tif (!isIdentifierStartCharacter(first)) return INVALID_AUTHORING_ARGUMENT;\n\t\tlet end = index + 1;\n\t\twhile (isIdentifierCharacter(value[end])) end += 1;\n\t\tconst identifier = value.slice(index, end);\n\t\tindex = end;\n\t\treturn identifier;\n\t}\n\tfunction parseString() {\n\t\tconst quote = value[index];\n\t\tif (quote !== \"\\\"\" && quote !== \"'\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tlet result = \"\";\n\t\twhile (index < value.length) {\n\t\t\tconst character = value[index];\n\t\t\tindex += 1;\n\t\t\tif (character === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tif (character === quote) return result;\n\t\t\tif (character !== \"\\\\\") {\n\t\t\t\tresult += character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst escaped = value[index];\n\t\t\tindex += 1;\n\t\t\tif (escaped === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tswitch (escaped) {\n\t\t\t\tcase \"'\":\n\t\t\t\tcase \"\\\"\":\n\t\t\t\tcase \"\\\\\":\n\t\t\t\tcase \"/\":\n\t\t\t\t\tresult += escaped;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"b\":\n\t\t\t\t\tresult += \"\\b\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"f\":\n\t\t\t\t\tresult += \"\\f\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"n\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"r\":\n\t\t\t\t\tresult += \"\\r\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\tresult += \"\t\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"u\": {\n\t\t\t\t\tconst hex = value.slice(index, index + 4);\n\t\t\t\t\tif (!/^[0-9A-Fa-f]{4}$/.test(hex)) return INVALID_AUTHORING_ARGUMENT;\n\t\t\t\t\tresult += String.fromCharCode(Number.parseInt(hex, 16));\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t\t\t}\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseNumber() {\n\t\tconst raw = value.slice(index).match(/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/)?.[0];\n\t\tif (!raw) return INVALID_AUTHORING_ARGUMENT;\n\t\tconst parsed = Number(raw);\n\t\tif (!Number.isFinite(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += raw.length;\n\t\treturn parsed;\n\t}\n\tfunction parseArray() {\n\t\tif (value[index] !== \"[\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = [];\n\t\tskipWhitespace();\n\t\tif (value[index] === \"]\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult.push(entry);\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"]\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseObject() {\n\t\tif (value[index] !== \"{\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = {};\n\t\tskipWhitespace();\n\t\tif (value[index] === \"}\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tskipWhitespace();\n\t\t\tconst key = value[index] === \"\\\"\" || value[index] === \"'\" ? parseString() : parseIdentifier();\n\t\t\tif (key === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] !== \":\") return INVALID_AUTHORING_ARGUMENT;\n\t\t\tindex += 1;\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult[key] = entry;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"}\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseValue() {\n\t\tskipWhitespace();\n\t\tconst character = value[index];\n\t\tif (character === \"{\") return parseObject();\n\t\tif (character === \"[\") return parseArray();\n\t\tif (character === \"\\\"\" || character === \"'\") return parseString();\n\t\tif (character === \"-\" || /\\d/.test(character ?? \"\")) return parseNumber();\n\t\tconst identifier = parseIdentifier();\n\t\tif (identifier === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\tif (identifier === \"true\") return true;\n\t\tif (identifier === \"false\") return false;\n\t\tif (identifier === \"null\") return null;\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tskipWhitespace();\n\tconst parsed = parseValue();\n\tif (parsed === INVALID_AUTHORING_ARGUMENT) return parsed;\n\tskipWhitespace();\n\treturn index === value.length ? parsed : INVALID_AUTHORING_ARGUMENT;\n}\nfunction parseStringArrayLiteral(value) {\n\tconst parsed = parseJsLikeLiteral(value);\n\tif (parsed === INVALID_AUTHORING_ARGUMENT || !Array.isArray(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\tif (!parsed.every((item) => typeof item === \"string\")) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction parsePslObjectLiteral(value) {\n\tconst trimmed = value.trim();\n\tif (!trimmed.startsWith(\"{\") || !trimmed.endsWith(\"}\")) return INVALID_AUTHORING_ARGUMENT;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(trimmed);\n\t} catch {\n\t\tparsed = parseJsLikeLiteral(trimmed);\n\t\tif (parsed === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t}\n\tif (!isPlainObject(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction parsePslAuthoringArgumentValue(descriptor, rawValue) {\n\tswitch (descriptor.kind) {\n\t\tcase \"string\": return unquoteStringLiteral(rawValue);\n\t\tcase \"boolean\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\tif (trimmed === \"true\") return true;\n\t\t\tif (trimmed === \"false\") return false;\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tcase \"number\": {\n\t\t\tconst parsed = Number(unquoteStringLiteral(rawValue));\n\t\t\treturn Number.isNaN(parsed) ? INVALID_AUTHORING_ARGUMENT : parsed;\n\t\t}\n\t\tcase \"stringArray\": return parseStringArrayLiteral(rawValue);\n\t\tcase \"object\": return parsePslObjectLiteral(rawValue);\n\t\tcase \"option\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\treturn /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) ? trimmed : INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t}\n}\nfunction pushInvalidPslHelperArgument(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${input.entityLabel} ${input.helperLabel} ${input.message}`,\n\t\t...input.source.at(input.span)\n\t});\n}\nfunction mapPslHelperArgs(input) {\n\tconst mappedArgs = input.descriptors.map(() => void 0);\n\tconst positionalArgs = input.args.filter((arg) => arg.kind === \"positional\");\n\tconst namedArgs = input.args.filter((arg) => arg.kind === \"named\");\n\tif (positionalArgs.length > input.descriptors.length) return pushInvalidPslHelperArgument({\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tspan: input.span,\n\t\tentityLabel: input.entityLabel,\n\t\thelperLabel: input.helperLabel,\n\t\tmessage: `accepts at most ${input.descriptors.length} argument(s), received ${positionalArgs.length}.`\n\t});\n\tfor (const [index, argument] of positionalArgs.entries()) {\n\t\tconst descriptor = input.descriptors[index];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define positional argument #${index + 1}.`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse argument #${index + 1} for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[index] = value;\n\t}\n\tfor (const argument of namedArgs) {\n\t\tconst descriptorIndex = input.descriptors.findIndex((descriptor) => descriptor.name === argument.name);\n\t\tif (descriptorIndex < 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received unknown named argument \"${argument.name}\".`\n\t\t});\n\t\tif (mappedArgs[descriptorIndex] !== void 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received duplicate value for argument \"${argument.name}\".`\n\t\t});\n\t\tconst descriptor = input.descriptors[descriptorIndex];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define named argument \"${argument.name}\".`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse named argument \"${argument.name}\" for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[descriptorIndex] = value;\n\t}\n\treturn mappedArgs;\n}\n//#endregion\n//#region src/enum-member-attributes.ts\nfunction enumMemberAttributeDiagnostics(enumBlock, sources) {\n\tconst source = diagnosticSource(sources, enumBlock.node.syntax);\n\treturn Array.from(enumBlock.node.entries()).flatMap((member) => Array.from(member.attributes(), (attribute) => ({\n\t\tcode: \"PSL_UNSUPPORTED_ENUM_MEMBER_ATTRIBUTE\",\n\t\tmessage: `enum \"${enumBlock.name}\": member \"${member.key()?.name() ?? \"?\"}\" carries @${attribute.name()?.path().join(\".\") ?? \"?\"}, but an enum member takes no attributes`,\n\t\t...source.at(nodePslSpan(attribute.syntax, sources))\n\t})));\n}\n//#endregion\n//#region src/field-presets.ts\n/**\n* Pushes the canonical `PSL_EXTENSION_NAMESPACE_NOT_COMPOSED` diagnostic for a subject (attribute, model attribute, or type constructor) that references an extension namespace which is not composed in the current contract.\n*\n* The `data` payload carries the missing namespace so machine consumers (agents, IDE extensions, CLI auto-fix) don't have to parse the prose.\n*/\nfunction uncomposedNamespaceDiagnostic(input) {\n\treturn {\n\t\tcode: \"PSL_EXTENSION_NAMESPACE_NOT_COMPOSED\",\n\t\tmessage: `${input.subjectLabel} uses unrecognized namespace \"${input.namespace}\". Add extension pack \"${input.namespace}\" to extensions in prisma.config.ts.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\tsuggestedPack: input.namespace\n\t\t}\n\t};\n}\nfunction reportUncomposedNamespace(input) {\n\tinput.diagnostics.push(uncomposedNamespaceDiagnostic({\n\t\tsubjectLabel: input.subjectLabel,\n\t\tnamespace: input.namespace,\n\t\tsource: input.source,\n\t\tspan: input.span\n\t}));\n}\n/**\n* Pushes the canonical `PSL_UNKNOWN_FIELD_PRESET` diagnostic when a typoed preset name is referenced inside a registered field-preset namespace. The `data` payload exposes the namespace and full helper path so machine consumers (agents, IDE extensions) don't have to parse the prose.\n*/\nfunction reportUnknownFieldPreset(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_UNKNOWN_FIELD_PRESET\",\n\t\tmessage: `${input.entityLabel} references unknown field preset \"${input.helperPath}\". Check the spelling against the available presets in the \"${input.namespace}\" namespace.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\thelperPath: input.helperPath\n\t\t}\n\t});\n}\n/**\n* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.\n*\n* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.\n*/\nfunction instantiatePslFieldPreset(input) {\n\tconst helperPath = input.call.path.join(\".\");\n\tconst args = mapPslHelperArgs({\n\t\targs: input.call.args,\n\t\tdescriptors: input.descriptor.args ?? [],\n\t\thelperLabel: `preset \"${helperPath}\"`,\n\t\tspan: input.call.span,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel\n\t});\n\tif (!args) return;\n\ttry {\n\t\tvalidateAuthoringHelperArguments(helperPath, input.descriptor.args, args);\n\t\treturn instantiateAuthoringFieldPreset(input.descriptor, args);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.entityLabel} preset \"${helperPath}\" ${message}`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/interpret.ts\n/**\n* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an\n* interpretation result. The authored headline is deliberately uniform — it\n* reports how many errors the schema has, never which pipeline stage found\n* them.\n*/\nfunction withSeedDiagnostics(result, seedDiagnostics) {\n\tif (seedDiagnostics.length === 0) return result;\n\tconst diagnostics = result.ok ? seedDiagnostics : [...seedDiagnostics, ...result.failure.diagnostics];\n\treturn notOk({\n\t\tsummary: `Schema has ${diagnostics.length} error${diagnostics.length === 1 ? \"\" : \"s\"}`,\n\t\tdiagnostics,\n\t\t...result.ok || result.failure.meta === void 0 ? {} : { meta: result.failure.meta }\n\t});\n}\n/** The single seam that narrows a contract source to the interpret capability. */\nfunction hasPslInterpreter(source) {\n\treturn source.format === \"psl\" && \"interpret\" in source && typeof source.interpret === \"function\";\n}\n//#endregion\n//#region src/relation-backrelations.ts\nfunction fkRelationPairKey(declaringModelName, targetModelName) {\n\treturn `${declaringModelName}::${targetModelName}`;\n}\n/**\n* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair\n* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.\n* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.\n*/\nfunction consumeInvalidFkPairing(candidate, pairKey, invalidFkPairings) {\n\tconst index = invalidFkPairings.findIndex((pairing) => pairing.pairKey === pairKey && pairing.relationName === candidate.relationName);\n\tif (index === -1) return false;\n\tinvalidFkPairings.splice(index, 1);\n\treturn true;\n}\nfunction requiredOneToOneBackrelationDiagnostic(input) {\n\tconst { modelName, field, targetModelName, sources, recordNoun } = input;\n\treturn {\n\t\tcode: \"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\tmessage: `Backrelation field \"${modelName}.${field.name}\" is required, but \"${targetModelName}\" holds the relation fields, so nothing in storage guarantees a \"${targetModelName}\" ${recordNoun} exists. Make it optional: \"${field.name} ${targetModelName}?\".`,\n\t\t...diagnosticSource(sources, field.node.syntax).at(field.span)\n\t};\n}\n//#endregion\n//#region src/unclaimed-blocks.ts\n/** A generic block is read only when a composed descriptor claims its keyword. */\nfunction claimedBlockKeywords(descriptors) {\n\tconst keywords = /* @__PURE__ */ new Set();\n\tfor (const [keyword, value] of Object.entries(descriptors ?? {})) if (isAuthoringPslBlockDescriptor(value)) keywords.add(keyword);\n\treturn keywords;\n}\nfunction unsupportedBlockDiagnostic(block, sources) {\n\treturn {\n\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\tmessage: `Unsupported top-level block \"${block.keyword}\"`,\n\t\t...diagnosticSource(sources, block.node.syntax).at(keywordPslSpan(block.node.syntax, block.keyword, sources))\n\t};\n}\n//#endregion\nexport { claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, mapPslHelperArgs, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, uncomposedNamespaceDiagnostic, unsupportedBlockDiagnostic, withSeedDiagnostics };\n\n//# sourceMappingURL=interpret.mjs.map"],"mappings":";;;;AAIA,SAAS,qBAAqB,OAAO;CACpC,MAAM,UAAU,MAAM,KAAK;CAC3B,MAAM,QAAQ,QAAQ,MAAM,gBAAgB;CAC5C,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,MAAM,MAAM;AACpB;AACA,MAAM,6BAA6B,OAAO,0BAA0B;AACpE,SAAS,2BAA2B,WAAW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AAS,wBAAwB,WAAW,SAAS,mBAAmB;CACvE,MAAM,QAAQ,kBAAkB,WAAW,YAAY,QAAQ,YAAY,WAAW,QAAQ,iBAAiB,UAAU,YAAY;CACrI,IAAI,UAAU,IAAI,OAAO;CACzB,kBAAkB,OAAO,OAAO,CAAC;CACjC,OAAO;AACR;AACA,SAAS,uCAAuC,OAAO;CACtD,MAAM,EAAE,WAAW,OAAO,iBAAiB,SAAS,eAAe;CACnE,OAAO;EACN,MAAM;EACN,SAAS,uBAAuB,UAAU,GAAG,MAAM,KAAK,sBAAsB,gBAAgB,mEAAmE,gBAAgB,IAAI,WAAW,8BAA8B,MAAM,KAAK,GAAG,gBAAgB;EAC5P,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,MAAM,IAAI;CAC9D;AACD;;AAIA,SAAS,qBAAqB,aAAa;CAC1C,MAAM,2BAA2B,IAAI,IAAI;CACzC,KAAK,MAAM,CAAC,SAAS,UAAU,OAAO,QAAQ,eAAe,CAAC,CAAC,GAAG,IAAI,8BAA8B,KAAK,GAAG,SAAS,IAAI,OAAO;CAChI,OAAO;AACR;AACA,SAAS,2BAA2B,OAAO,SAAS;CACnD,OAAO;EACN,MAAM;EACN,SAAS,gCAAgC,MAAM,QAAQ;EACvD,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,eAAe,MAAM,KAAK,QAAQ,MAAM,SAAS,OAAO,CAAC;CAC7G;AACD"}
|
|
1
|
+
{"version":3,"file":"psl-parser__interpret.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs"],"sourcesContent":["import { c as diagnosticSource, n as nodePslSpan, t as keywordPslSpan } from \"./resolve-GE34dgM6.mjs\";\nimport { fieldPresetSpellings, instantiateAuthoringFieldPreset, isAuthoringPslBlockDescriptor, validateAuthoringHelperArguments } from \"@internal/framework-components/authoring\";\nimport { notOk } from \"@internal/utils/result\";\n//#region src/authoring-arguments.ts\nfunction unquoteStringLiteral(value) {\n\tconst trimmed = value.trim();\n\tconst match = trimmed.match(/^(['\"])(.*)\\1$/);\n\tif (!match) return trimmed;\n\treturn match[2] ?? \"\";\n}\nconst INVALID_AUTHORING_ARGUMENT = Symbol(\"invalidAuthoringArgument\");\nfunction isIdentifierStartCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z_$]/.test(character);\n}\nfunction isIdentifierCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z0-9_$]/.test(character);\n}\nfunction parseJsLikeLiteral(value) {\n\tlet index = 0;\n\tfunction skipWhitespace() {\n\t\twhile (/\\s/.test(value[index] ?? \"\")) index += 1;\n\t}\n\tfunction parseIdentifier() {\n\t\tconst first = value[index];\n\t\tif (!isIdentifierStartCharacter(first)) return INVALID_AUTHORING_ARGUMENT;\n\t\tlet end = index + 1;\n\t\twhile (isIdentifierCharacter(value[end])) end += 1;\n\t\tconst identifier = value.slice(index, end);\n\t\tindex = end;\n\t\treturn identifier;\n\t}\n\tfunction parseString() {\n\t\tconst quote = value[index];\n\t\tif (quote !== \"\\\"\" && quote !== \"'\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tlet result = \"\";\n\t\twhile (index < value.length) {\n\t\t\tconst character = value[index];\n\t\t\tindex += 1;\n\t\t\tif (character === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tif (character === quote) return result;\n\t\t\tif (character !== \"\\\\\") {\n\t\t\t\tresult += character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst escaped = value[index];\n\t\t\tindex += 1;\n\t\t\tif (escaped === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tswitch (escaped) {\n\t\t\t\tcase \"'\":\n\t\t\t\tcase \"\\\"\":\n\t\t\t\tcase \"\\\\\":\n\t\t\t\tcase \"/\":\n\t\t\t\t\tresult += escaped;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"b\":\n\t\t\t\t\tresult += \"\\b\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"f\":\n\t\t\t\t\tresult += \"\\f\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"n\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"r\":\n\t\t\t\t\tresult += \"\\r\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\tresult += \"\t\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"u\": {\n\t\t\t\t\tconst hex = value.slice(index, index + 4);\n\t\t\t\t\tif (!/^[0-9A-Fa-f]{4}$/.test(hex)) return INVALID_AUTHORING_ARGUMENT;\n\t\t\t\t\tresult += String.fromCharCode(Number.parseInt(hex, 16));\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t\t\t}\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseNumber() {\n\t\tconst raw = value.slice(index).match(/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/)?.[0];\n\t\tif (!raw) return INVALID_AUTHORING_ARGUMENT;\n\t\tconst parsed = Number(raw);\n\t\tif (!Number.isFinite(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += raw.length;\n\t\treturn parsed;\n\t}\n\tfunction parseArray() {\n\t\tif (value[index] !== \"[\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = [];\n\t\tskipWhitespace();\n\t\tif (value[index] === \"]\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult.push(entry);\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"]\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseObject() {\n\t\tif (value[index] !== \"{\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = {};\n\t\tskipWhitespace();\n\t\tif (value[index] === \"}\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tskipWhitespace();\n\t\t\tconst key = value[index] === \"\\\"\" || value[index] === \"'\" ? parseString() : parseIdentifier();\n\t\t\tif (key === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] !== \":\") return INVALID_AUTHORING_ARGUMENT;\n\t\t\tindex += 1;\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult[key] = entry;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"}\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseValue() {\n\t\tskipWhitespace();\n\t\tconst character = value[index];\n\t\tif (character === \"{\") return parseObject();\n\t\tif (character === \"[\") return parseArray();\n\t\tif (character === \"\\\"\" || character === \"'\") return parseString();\n\t\tif (character === \"-\" || /\\d/.test(character ?? \"\")) return parseNumber();\n\t\tconst identifier = parseIdentifier();\n\t\tif (identifier === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\tif (identifier === \"true\") return true;\n\t\tif (identifier === \"false\") return false;\n\t\tif (identifier === \"null\") return null;\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tskipWhitespace();\n\tconst parsed = parseValue();\n\tif (parsed === INVALID_AUTHORING_ARGUMENT) return parsed;\n\tskipWhitespace();\n\treturn index === value.length ? parsed : INVALID_AUTHORING_ARGUMENT;\n}\nfunction parseStringArrayLiteral(value) {\n\tconst parsed = parseJsLikeLiteral(value);\n\tif (parsed === INVALID_AUTHORING_ARGUMENT || !Array.isArray(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\tif (!parsed.every((item) => typeof item === \"string\")) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction parsePslObjectLiteral(value) {\n\tconst trimmed = value.trim();\n\tif (!trimmed.startsWith(\"{\") || !trimmed.endsWith(\"}\")) return INVALID_AUTHORING_ARGUMENT;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(trimmed);\n\t} catch {\n\t\tparsed = parseJsLikeLiteral(trimmed);\n\t\tif (parsed === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t}\n\tif (!isPlainObject(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction parsePslAuthoringArgumentValue(descriptor, rawValue) {\n\tswitch (descriptor.kind) {\n\t\tcase \"string\": return unquoteStringLiteral(rawValue);\n\t\tcase \"boolean\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\tif (trimmed === \"true\") return true;\n\t\t\tif (trimmed === \"false\") return false;\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tcase \"number\": {\n\t\t\tconst parsed = Number(unquoteStringLiteral(rawValue));\n\t\t\treturn Number.isNaN(parsed) ? INVALID_AUTHORING_ARGUMENT : parsed;\n\t\t}\n\t\tcase \"stringArray\": return parseStringArrayLiteral(rawValue);\n\t\tcase \"object\": return parsePslObjectLiteral(rawValue);\n\t\tcase \"option\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\treturn /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) ? trimmed : INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t}\n}\nfunction pushInvalidPslHelperArgument(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${input.entityLabel} ${input.helperLabel} ${input.message}`,\n\t\t...input.source.at(input.span)\n\t});\n}\nfunction mapPslHelperArgs(input) {\n\tconst mappedArgs = input.descriptors.map(() => void 0);\n\tconst positionalArgs = input.args.filter((arg) => arg.kind === \"positional\");\n\tconst namedArgs = input.args.filter((arg) => arg.kind === \"named\");\n\tif (positionalArgs.length > input.descriptors.length) return pushInvalidPslHelperArgument({\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tspan: input.span,\n\t\tentityLabel: input.entityLabel,\n\t\thelperLabel: input.helperLabel,\n\t\tmessage: `accepts at most ${input.descriptors.length} argument(s), received ${positionalArgs.length}.`\n\t});\n\tfor (const [index, argument] of positionalArgs.entries()) {\n\t\tconst descriptor = input.descriptors[index];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define positional argument #${index + 1}.`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse argument #${index + 1} for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[index] = value;\n\t}\n\tfor (const argument of namedArgs) {\n\t\tconst descriptorIndex = input.descriptors.findIndex((descriptor) => descriptor.name === argument.name);\n\t\tif (descriptorIndex < 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received unknown named argument \"${argument.name}\".`\n\t\t});\n\t\tif (mappedArgs[descriptorIndex] !== void 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received duplicate value for argument \"${argument.name}\".`\n\t\t});\n\t\tconst descriptor = input.descriptors[descriptorIndex];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define named argument \"${argument.name}\".`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse named argument \"${argument.name}\" for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[descriptorIndex] = value;\n\t}\n\treturn mappedArgs;\n}\n//#endregion\n//#region src/enum-member-attributes.ts\nfunction enumMemberAttributeDiagnostics(enumBlock, sources) {\n\tconst source = diagnosticSource(sources, enumBlock.node.syntax);\n\treturn Array.from(enumBlock.node.entries()).flatMap((member) => Array.from(member.attributes(), (attribute) => ({\n\t\tcode: \"PSL_UNSUPPORTED_ENUM_MEMBER_ATTRIBUTE\",\n\t\tmessage: `enum \"${enumBlock.name}\": member \"${member.key()?.name() ?? \"?\"}\" carries @${attribute.name()?.path().join(\".\") ?? \"?\"}, but an enum member takes no attributes`,\n\t\t...source.at(nodePslSpan(attribute.syntax, sources))\n\t})));\n}\n//#endregion\n//#region src/field-presets.ts\n/**\n* Pushes the canonical `PSL_EXTENSION_NAMESPACE_NOT_COMPOSED` diagnostic for a subject (attribute, model attribute, or type constructor) that references an extension namespace which is not composed in the current contract.\n*\n* The `data` payload carries the missing namespace so machine consumers (agents, IDE extensions, CLI auto-fix) don't have to parse the prose.\n*/\nfunction uncomposedNamespaceDiagnostic(input) {\n\treturn {\n\t\tcode: \"PSL_EXTENSION_NAMESPACE_NOT_COMPOSED\",\n\t\tmessage: `${input.subjectLabel} uses unrecognized namespace \"${input.namespace}\". Add extension pack \"${input.namespace}\" to extensions in prisma.config.ts.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\tsuggestedPack: input.namespace\n\t\t}\n\t};\n}\nfunction reportUncomposedNamespace(input) {\n\tinput.diagnostics.push(uncomposedNamespaceDiagnostic({\n\t\tsubjectLabel: input.subjectLabel,\n\t\tnamespace: input.namespace,\n\t\tsource: input.source,\n\t\tspan: input.span\n\t}));\n}\n/**\n* Pushes the canonical `PSL_UNKNOWN_FIELD_PRESET` diagnostic when a typoed preset name is referenced inside a registered field-preset namespace. The `data` payload exposes the namespace and full helper path so machine consumers (agents, IDE extensions) don't have to parse the prose.\n*/\nfunction reportUnknownFieldPreset(input) {\n\tconst presets = fieldPresetSpellings(input.authoringContributions, input.namespace);\n\tconst listed = presets.length === 0 ? \"no field presets\" : presets.length === 1 ? presets.join(\"\") : `${presets.slice(0, -1).join(\", \")} and ${presets.at(-1)}`;\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_UNKNOWN_FIELD_PRESET\",\n\t\tmessage: `${input.entityLabel} references unknown field preset \"${input.helperPath}\". The \"${input.namespace}\" namespace has ${listed}.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\thelperPath: input.helperPath\n\t\t}\n\t});\n}\n/**\n* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.\n*\n* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.\n*/\nfunction instantiatePslFieldPreset(input) {\n\tconst helperPath = input.call.path.join(\".\");\n\tconst args = mapPslHelperArgs({\n\t\targs: input.call.args,\n\t\tdescriptors: input.descriptor.args ?? [],\n\t\thelperLabel: `preset \"${helperPath}\"`,\n\t\tspan: input.call.span,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel\n\t});\n\tif (!args) return;\n\ttry {\n\t\tvalidateAuthoringHelperArguments(helperPath, input.descriptor.args, args);\n\t\treturn instantiateAuthoringFieldPreset(input.descriptor, args);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.entityLabel}: ${message}`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/interpret.ts\n/**\n* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an\n* interpretation result. The authored headline is deliberately uniform — it\n* reports how many errors the schema has, never which pipeline stage found\n* them.\n*/\nfunction withSeedDiagnostics(result, seedDiagnostics) {\n\tif (seedDiagnostics.length === 0) return result;\n\tconst diagnostics = result.ok ? seedDiagnostics : [...seedDiagnostics, ...result.failure.diagnostics];\n\treturn notOk({\n\t\tsummary: `Schema has ${diagnostics.length} error${diagnostics.length === 1 ? \"\" : \"s\"}`,\n\t\tdiagnostics,\n\t\t...result.ok || result.failure.meta === void 0 ? {} : { meta: result.failure.meta }\n\t});\n}\n/** The single seam that narrows a contract source to the interpret capability. */\nfunction hasPslInterpreter(source) {\n\treturn source.format === \"psl\" && \"interpret\" in source && typeof source.interpret === \"function\";\n}\n//#endregion\n//#region src/relation-backrelations.ts\nfunction fkRelationPairKey(declaringModelName, targetModelName) {\n\treturn `${declaringModelName}::${targetModelName}`;\n}\n/**\n* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair\n* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.\n* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.\n*/\nfunction consumeInvalidFkPairing(candidate, pairKey, invalidFkPairings) {\n\tconst index = invalidFkPairings.findIndex((pairing) => pairing.pairKey === pairKey && pairing.relationName === candidate.relationName);\n\tif (index === -1) return false;\n\tinvalidFkPairings.splice(index, 1);\n\treturn true;\n}\nfunction requiredOneToOneBackrelationDiagnostic(input) {\n\tconst { modelName, field, targetModelName, sources, recordNoun } = input;\n\treturn {\n\t\tcode: \"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\tmessage: `Backrelation field \"${modelName}.${field.name}\" is required, but \"${targetModelName}\" holds the relation fields, so nothing in storage guarantees a \"${targetModelName}\" ${recordNoun} exists. Make it optional: \"${field.name} ${targetModelName}?\".`,\n\t\t...diagnosticSource(sources, field.node.syntax).at(field.span)\n\t};\n}\n//#endregion\n//#region src/unclaimed-blocks.ts\n/** A generic block is read only when a composed descriptor claims its keyword. */\nfunction claimedBlockKeywords(descriptors) {\n\tconst keywords = /* @__PURE__ */ new Set();\n\tfor (const [keyword, value] of Object.entries(descriptors ?? {})) if (isAuthoringPslBlockDescriptor(value)) keywords.add(keyword);\n\treturn keywords;\n}\nfunction unsupportedBlockDiagnostic(block, sources) {\n\treturn {\n\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\tmessage: `Unsupported top-level block \"${block.keyword}\"`,\n\t\t...diagnosticSource(sources, block.node.syntax).at(keywordPslSpan(block.node.syntax, block.keyword, sources))\n\t};\n}\n//#endregion\nexport { claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, mapPslHelperArgs, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, uncomposedNamespaceDiagnostic, unsupportedBlockDiagnostic, withSeedDiagnostics };\n\n//# sourceMappingURL=interpret.mjs.map"],"mappings":";;;;;AAIA,SAAS,qBAAqB,OAAO;CACpC,MAAM,UAAU,MAAM,KAAK;CAC3B,MAAM,QAAQ,QAAQ,MAAM,gBAAgB;CAC5C,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,MAAM,MAAM;AACpB;AACA,MAAM,6BAA6B,OAAO,0BAA0B;AACpE,SAAS,2BAA2B,WAAW;CAC9C,OAAO,cAAc,KAAK,KAAK,aAAa,KAAK,SAAS;AAC3D;AACA,SAAS,sBAAsB,WAAW;CACzC,OAAO,cAAc,KAAK,KAAK,gBAAgB,KAAK,SAAS;AAC9D;AACA,SAAS,mBAAmB,OAAO;CAClC,IAAI,QAAQ;CACZ,SAAS,iBAAiB;EACzB,OAAO,KAAK,KAAK,MAAM,UAAU,EAAE,GAAG,SAAS;CAChD;CACA,SAAS,kBAAkB;EAC1B,MAAM,QAAQ,MAAM;EACpB,IAAI,CAAC,2BAA2B,KAAK,GAAG,OAAO;EAC/C,IAAI,MAAM,QAAQ;EAClB,OAAO,sBAAsB,MAAM,IAAI,GAAG,OAAO;EACjD,MAAM,aAAa,MAAM,MAAM,OAAO,GAAG;EACzC,QAAQ;EACR,OAAO;CACR;CACA,SAAS,cAAc;EACtB,MAAM,QAA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ACN,SAAS,uBAAuB,UAAU,GAAG,MAAM,KAAK,sBAAsB,gBAAgB,mEAAmE,gBAAgB,IAAI,WAAW,8BAA8B,MAAM,KAAK,GAAG,gBAAgB;EAC5P,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,MAAM,IAAI;CAC9D;AACD;;AAIA,SAAS,qBAAqB,aAAa;CAC1C,MAAM,2BAA2B,IAAI,IAAI;CACzC,KAAK,MAAM,CAAC,SAAS,UAAU,OAAO,QAAQ,eAAe,CAAC,CAAC,GAAG,IAAI,8BAA8B,KAAK,GAAG,SAAS,IAAI,OAAO;CAChI,OAAO;AACR;AACA,SAAS,2BAA2B,OAAO,SAAS;CACnD,OAAO;EACN,MAAM;EACN,SAAS,gCAAgC,MAAM,QAAQ;EACvD,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,eAAe,MAAM,KAAK,QAAQ,MAAM,SAAS,OAAO,CAAC;CAC7G;AACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as TokenKind } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
2
|
-
import { A as ObjectFieldAst, B as SourceFile, C as KeyValuePairAst, D as NamespaceDeclarationAst, E as NamedTypeDeclarationAst, G as SyntaxNode, H as StringLiteralQuote, J as TokenAtOffset, K as SyntaxToken, L as PslSources, M as ParseDiagnostic, N as ParseResult, O as NamespaceMemberAst, P as Position, Q as castExpression, R as QualifiedNameAst, S as IdentifierAst, T as ModelDeclarationAst, U as SyntaxElement, V as StringLiteralExprAst, W as SyntaxKind, X as TypesBlockAst, Y as TypeAnnotationAst, Z as any, _ as GenericBlockDeclarationAst, a as AttributeAst, at as findFirstChild, b as GreenNode, c as BracedBlock, et as createSyntaxTree, f as DocumentAst, g as FunctionCallAst, h as FieldDeclarationAst, i as AttributeArgListAst, it as findChildToken, j as ObjectLiteralExprAst, k as NumberLiteralExprAst, l as CompositeTypeDeclarationAst, lt as parse, m as FieldAttributeAst, n as AstNode, o as BlockMemberAst, ot as greenNode, p as ExpressionAst, q as TaggedLiteralExprAst, r as AttributeArgAst, rt as filterChildren, s as BooleanLiteralExprAst, st as greenToken, t as ArrayLiteralAst, u as DeclarationAst, ut as printSyntax, v as GenericBlockMemberAst, w as ModelAttributeAst, x as GreenToken, y as GreenElement, z as Range } from "./parse-DZRO_CK2-
|
|
2
|
+
import { A as ObjectFieldAst, B as SourceFile, C as KeyValuePairAst, D as NamespaceDeclarationAst, E as NamedTypeDeclarationAst, G as SyntaxNode, H as StringLiteralQuote, J as TokenAtOffset, K as SyntaxToken, L as PslSources, M as ParseDiagnostic, N as ParseResult, O as NamespaceMemberAst, P as Position, Q as castExpression, R as QualifiedNameAst, S as IdentifierAst, T as ModelDeclarationAst, U as SyntaxElement, V as StringLiteralExprAst, W as SyntaxKind, X as TypesBlockAst, Y as TypeAnnotationAst, Z as any, _ as GenericBlockDeclarationAst, a as AttributeAst, at as findFirstChild, b as GreenNode, c as BracedBlock, et as createSyntaxTree, f as DocumentAst, g as FunctionCallAst, h as FieldDeclarationAst, i as AttributeArgListAst, it as findChildToken, j as ObjectLiteralExprAst, k as NumberLiteralExprAst, l as CompositeTypeDeclarationAst, lt as parse, m as FieldAttributeAst, n as AstNode, o as BlockMemberAst, ot as greenNode, p as ExpressionAst, q as TaggedLiteralExprAst, r as AttributeArgAst, rt as filterChildren, s as BooleanLiteralExprAst, st as greenToken, t as ArrayLiteralAst, u as DeclarationAst, ut as printSyntax, v as GenericBlockMemberAst, w as ModelAttributeAst, x as GreenToken, y as GreenElement, z as Range } from "./parse-DZRO_CK2-BtDklsaV.mjs";
|
|
3
3
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/syntax.d.mts
|
|
4
4
|
//#region src/syntax/green-builder.d.ts
|
|
5
5
|
declare class GreenNodeBuilder {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as createSyntaxTree, c as findFirstChild, i as any, l as printSyntax, n as SyntaxToken, o as filterChildren, r as TokenAtOffset, s as findChildToken, t as SyntaxNode } from "./ast-helpers-2XRnkQEO-BxG5qx3Q.mjs";
|
|
2
|
-
import { C as TypeAnnotationAst, S as TaggedLiteralExprAst, T as castExpression, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, b as QualifiedNameAst, c as FieldDeclarationAst, d as IdentifierAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, n as AttributeArgAst, o as DocumentAst, p as ModelAttributeAst, r as AttributeArgListAst, s as FieldAttributeAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, v as ObjectFieldAst, w as TypesBlockAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-BrSntcPa-
|
|
3
|
-
import { a as greenToken, i as greenNode, n as PslSources, o as parse, r as SourceFile, t as GreenNodeBuilder } from "./parse-CfZKsx8i-
|
|
2
|
+
import { C as TypeAnnotationAst, S as TaggedLiteralExprAst, T as castExpression, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, b as QualifiedNameAst, c as FieldDeclarationAst, d as IdentifierAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, n as AttributeArgAst, o as DocumentAst, p as ModelAttributeAst, r as AttributeArgListAst, s as FieldAttributeAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, v as ObjectFieldAst, w as TypesBlockAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-BrSntcPa-BUYk6wxW.mjs";
|
|
3
|
+
import { a as greenToken, i as greenNode, n as PslSources, o as parse, r as SourceFile, t as GreenNodeBuilder } from "./parse-CfZKsx8i-DpxGIwhF.mjs";
|
|
4
4
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/syntax.mjs
|
|
5
5
|
const TRIVIA_KINDS = /* @__PURE__ */ new Set([
|
|
6
6
|
"Whitespace",
|
package/dist/psl-printer.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-AkdL38SR-DRSNWmJT.mjs";
|
|
2
|
-
import "./authoring-
|
|
2
|
+
import "./authoring-BfEjYZpO.mjs";
|
|
3
3
|
import { f as PslDocumentAst } from "./psl-ast-BjC549ky-CD7J2H0j.mjs";
|
|
4
4
|
import "./psl-ast-C90I4nkm.mjs";
|
|
5
5
|
//#region ../../../1-framework/2-authoring/psl-printer/dist/index.d.mts
|
package/dist/psl-printer.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
2
2
|
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
3
|
-
import { v as isAuthoringPslBlockDescriptor } from "./temporal-presets-
|
|
3
|
+
import { v as isAuthoringPslBlockDescriptor } from "./temporal-presets-MavBeaJC-BcqWVoBB.mjs";
|
|
4
4
|
import { a as flatPslModels, c as namespacePslExtensionBlocks } from "./psl-ast-CyvE6CR-.mjs";
|
|
5
5
|
//#region ../../../1-framework/2-authoring/psl-printer/dist/index.mjs
|
|
6
6
|
function contractError(code, message, options) {
|
|
@@ -764,7 +764,7 @@ interface MutationDefaults {
|
|
|
764
764
|
}
|
|
765
765
|
/** Registers every generator the contributors provide, by id. Two contributors providing one id is an error naming both. */
|
|
766
766
|
declare function collectMutationDefaultGenerators(contributors: ReadonlyArray<MutationDefaultGeneratorContributor>): ReadonlyMap<string, RuntimeMutationDefaultGenerator>;
|
|
767
|
-
/** Fails when the contract's mutation defaults name a generator the registry does not hold, listing every missing id. */
|
|
767
|
+
/** Fails when the contract's mutation defaults name a generator the registry does not hold, listing every missing id and the fields that need it. */
|
|
768
768
|
declare function assertMutationDefaultGeneratorsAvailable(execution: ContractExecutionSection | undefined, generatorRegistry: ReadonlyMap<string, RuntimeMutationDefaultGenerator>): void;
|
|
769
769
|
/**
|
|
770
770
|
* The defaults to write for one record: for each mutation default of the entry and namespace whose phase matches `op`, the generated value of every field the values do not carry. An update with no keys gets none.
|
|
@@ -1147,4 +1147,4 @@ interface LaneMetaBuilder<K extends OperationKind> extends MetaBuilder<K> {
|
|
|
1147
1147
|
declare function createMetaBuilder<K extends OperationKind>(kind: K, terminalName: string): LaneMetaBuilder<K>;
|
|
1148
1148
|
//#endregion
|
|
1149
1149
|
export { runExecuteWithMiddleware as $, RuntimeExecuteOptions as A, ValidAnnotations as B, RelationKeys as C, RuntimeCore as D, RuntimeAbortedPhase as E, RuntimeMutationDefaultGenerator as F, checkMiddlewareCompatibility as G, assertAnnotationsApplicable as H, RuntimeStatementStats as I, defineAnnotation as J, collectMutationDefaultGenerators as K, Scalars as L, RuntimeLog as M, RuntimeMiddleware as N, RuntimeCoreOptions as O, RuntimeMiddlewareContext as P, runBeforeQueryChain as Q, Shape as R, RUNTIME_ABORTED as S, ResultType as T, assertMutationDefaultGeneratorsAvailable as U, applyMutationDefaults as V, checkAborted as W, raceAgainstAbort as X, isRuntimeError as Y, runBeforeExecuteChain as Z, MutationDefaultsOptions as _, AppliedMutationDefault as a, QueryInterceptResult as b, DefineAnnotationOptions as c, GeneratorStability as d, runQueryWithMiddleware as et, LaneMetaBuilder as f, MutationDefaultsOp as g, MutationDefaults as h, AnnotationValue as i, RuntimeExecutor as j, RuntimeErrorEnvelope as k, ExecuteInterceptResult as l, MutationDefaultGeneratorContributor as m, AfterQueryResult as n, runtimeError as nt, AsyncIterableResult as o, MetaBuilder as p, createMetaBuilder as q, AnnotationHandle as r, CrossFamilyMiddleware as s, AfterExecuteResult as t, runtimeAborted as tt, ExecutionPlan as u, OperationKind as v, RelationNamesOf as w, QueryPlan as x, ParamRefMutator as y, ShapeSpec as z };
|
|
1150
|
-
//# sourceMappingURL=runtime-
|
|
1150
|
+
//# sourceMappingURL=runtime-BWD7UzMV.d.mts.map
|