@prisma/orm-framework 8.0.0-rc.12-dev.14 → 8.0.0-rc.12-dev.16
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/ast-helpers-2XRnkQEO-BxG5qx3Q.mjs +386 -0
- package/dist/ast-helpers-2XRnkQEO-BxG5qx3Q.mjs.map +1 -0
- package/dist/authoring-BffMNBO5.d.mts +43 -0
- package/dist/authoring-BffMNBO5.d.mts.map +1 -0
- package/dist/authoring-DbG78eh2.mjs +88 -0
- package/dist/authoring-DbG78eh2.mjs.map +1 -0
- package/dist/{hashing-utils-DQgS3nOe.mjs → canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs} +23 -3
- package/dist/canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs.map +1 -0
- package/dist/{utils-DMAM0unR.mjs → canonicalize-json-ZPawceQR-Dua1VNEB.mjs} +2 -2
- package/dist/canonicalize-json-ZPawceQR-Dua1VNEB.mjs.map +1 -0
- package/dist/components.d.mts +6 -6
- package/dist/components.mjs +6 -6
- package/dist/components__authoring.d.mts +2 -2
- package/dist/components__authoring.mjs +2 -2
- package/dist/components__control.d.mts +2 -2
- package/dist/components__control.mjs +2 -2
- package/dist/components__psl-ast.d.mts +3 -3
- package/dist/components__psl-ast.mjs +2 -2
- package/dist/components__runtime.d.mts +2 -2
- package/dist/components__runtime.mjs +2 -2
- package/dist/components__utils.mjs +1 -1
- package/dist/{config-types-DgoEWkgA.d.mts → config-types-CWeyMWBV.d.mts} +17 -14
- package/dist/config-types-CWeyMWBV.d.mts.map +1 -0
- package/dist/{config-types-BZjCZ4qx.mjs → config-types-D0mYyP62.mjs} +25 -2
- package/dist/config-types-D0mYyP62.mjs.map +1 -0
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +2 -2
- package/dist/config__config-types.d.mts +2 -2
- package/dist/config__config-types.mjs +2 -2
- package/dist/contract-authoring.d.mts +1 -1
- package/dist/contract.d.mts +2 -2
- package/dist/contract.mjs +3 -4
- package/dist/contract__hashing-utils.mjs +1 -2
- package/dist/contract__hashing.d.mts +2 -2
- package/dist/contract__hashing.mjs +2 -2
- package/dist/{control-Bc_dos9-.d.mts → control-BTo8rNKi.d.mts} +23 -3
- package/dist/{control-Bc_dos9-.d.mts.map → control-BTo8rNKi.d.mts.map} +1 -1
- package/dist/{control-BjK3Jrmp.mjs → control-CS45l6kB.mjs} +5 -2
- package/dist/control-CS45l6kB.mjs.map +1 -0
- package/dist/{declarations-D79GooqC-CcAbqTsq.mjs → declarations-43E1JFHg-DGBa0YH_.mjs} +8 -388
- package/dist/declarations-43E1JFHg-DGBa0YH_.mjs.map +1 -0
- package/dist/errors.d.mts +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/{execution-oqC6O8ES.d.mts → execution-BsiK0DjS.d.mts} +2 -2
- package/dist/{execution-oqC6O8ES.d.mts.map → execution-BsiK0DjS.d.mts.map} +1 -1
- package/dist/hashing-BAPc4zoz.d.mts +36 -0
- package/dist/hashing-BAPc4zoz.d.mts.map +1 -0
- package/dist/{hashing-BtIZVNYX.mjs → hashing-CjTNYBuj.mjs} +21 -3
- package/dist/hashing-CjTNYBuj.mjs.map +1 -0
- package/dist/{parse-SHpUIBnv-BvPsKLqw.d.mts → parse-DZRO_CK2-D8YAg23m.d.mts} +10 -18
- package/dist/{parse-SHpUIBnv-BvPsKLqw.d.mts.map → parse-DZRO_CK2-D8YAg23m.d.mts.map} +1 -1
- package/dist/{parse-DN-F4ASD-ClJdPlzj.mjs → parse-Km2Ne67K-CakfHP9f.mjs} +26 -29
- package/dist/parse-Km2Ne67K-CakfHP9f.mjs.map +1 -0
- package/dist/{psl-ast-BKF2fYgk-D6YxdCnP.d.mts → psl-ast-BePuKena-AYNqFKCE.d.mts} +8 -3
- package/dist/{psl-ast-BKF2fYgk-D6YxdCnP.d.mts.map → psl-ast-BePuKena-AYNqFKCE.d.mts.map} +1 -1
- package/dist/{psl-ast-Bu85Lu-k.d.mts → psl-ast-Cec7KbOn.d.mts} +2 -2
- package/dist/{psl-ast-Bu85Lu-k.d.mts.map → psl-ast-Cec7KbOn.d.mts.map} +1 -1
- package/dist/{psl-ast-DUCvVXbB.mjs → psl-ast-DYtFdynZ.mjs} +7 -2
- package/dist/psl-ast-DYtFdynZ.mjs.map +1 -0
- package/dist/psl-parser.d.mts +14 -7
- package/dist/psl-parser.d.mts.map +1 -1
- package/dist/psl-parser.mjs +10 -65
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__format.mjs +23 -30
- package/dist/psl-parser__format.mjs.map +1 -1
- package/dist/psl-parser__interpret.d.mts +15 -7
- package/dist/psl-parser__interpret.d.mts.map +1 -1
- package/dist/psl-parser__interpret.mjs +24 -3
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/psl-parser__syntax.d.mts +3 -3
- package/dist/psl-parser__syntax.mjs +3 -2
- package/dist/psl-parser__syntax.mjs.map +1 -1
- package/dist/psl-parser__tokenizer.d.mts +1 -1
- package/dist/psl-parser__tokenizer.mjs +1 -1
- package/dist/psl-printer.d.mts +8 -3
- package/dist/psl-printer.d.mts.map +1 -1
- package/dist/psl-printer.mjs +16 -9
- package/dist/psl-printer.mjs.map +1 -1
- package/dist/resolve-D_lZ54qh-DqOQkoMT.mjs +145 -0
- package/dist/resolve-D_lZ54qh-DqOQkoMT.mjs.map +1 -0
- package/dist/{runtime-Dnv06bEV.d.mts → runtime-CQ9-3czC.d.mts} +52 -2
- package/dist/runtime-CQ9-3czC.d.mts.map +1 -0
- package/dist/{runtime-DXmHIbAr.mjs → runtime-CpojufYS.mjs} +80 -2
- package/dist/{runtime-DXmHIbAr.mjs.map → runtime-CpojufYS.mjs.map} +1 -1
- package/dist/{symbol-table-DVPEY1fq-C5mC1wdG.d.mts → symbol-table-CRtoii4t-DubuO_5j.d.mts} +5 -5
- package/dist/{symbol-table-DVPEY1fq-C5mC1wdG.d.mts.map → symbol-table-CRtoii4t-DubuO_5j.d.mts.map} +1 -1
- package/dist/{tokenizer-CFsbtfFw-BnfUBepb.mjs → tokenizer-BMz7z2KR-J0yZ4im3.mjs} +11 -3
- package/dist/tokenizer-BMz7z2KR-J0yZ4im3.mjs.map +1 -0
- package/dist/{tokenizer-DcYI0Xrq-C-nNE9mE.d.mts → tokenizer-DW30uwhx-BHsWTwYk.d.mts} +8 -3
- package/dist/tokenizer-DW30uwhx-BHsWTwYk.d.mts.map +1 -0
- package/package.json +16 -15
- package/dist/authoring-D_Czkofy.mjs +0 -35
- package/dist/authoring-D_Czkofy.mjs.map +0 -1
- package/dist/authoring-DjeaZGzp.d.mts +0 -27
- package/dist/authoring-DjeaZGzp.d.mts.map +0 -1
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs +0 -25
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map +0 -1
- package/dist/config-types-BZjCZ4qx.mjs.map +0 -1
- package/dist/config-types-DgoEWkgA.d.mts.map +0 -1
- package/dist/control-BjK3Jrmp.mjs.map +0 -1
- package/dist/declarations-D79GooqC-CcAbqTsq.mjs.map +0 -1
- package/dist/diagnostic-Esyl8Qw1-Cd6SnWPN.mjs +0 -83
- package/dist/diagnostic-Esyl8Qw1-Cd6SnWPN.mjs.map +0 -1
- package/dist/hashing-BtIZVNYX.mjs.map +0 -1
- package/dist/hashing-WJflm0s1.d.mts +0 -25
- package/dist/hashing-WJflm0s1.d.mts.map +0 -1
- package/dist/hashing-utils-DQgS3nOe.mjs.map +0 -1
- package/dist/parse-DN-F4ASD-ClJdPlzj.mjs.map +0 -1
- package/dist/psl-ast-DUCvVXbB.mjs.map +0 -1
- package/dist/runtime-Dnv06bEV.d.mts.map +0 -1
- package/dist/tokenizer-CFsbtfFw-BnfUBepb.mjs.map +0 -1
- package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +0 -1
- package/dist/utils-DMAM0unR.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ct as PslSpan } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import "./psl-ast-
|
|
4
|
-
import { r as ContractSourceDiagnostic } from "./config-types-
|
|
5
|
-
import { n as TokenKind, t as Token } from "./tokenizer-
|
|
6
|
-
//#region ../../../1-framework/2-authoring/psl-parser/dist/parse-
|
|
2
|
+
import { vt as TaggedLiteralCanonicalization } from "./control-BTo8rNKi.mjs";
|
|
3
|
+
import "./psl-ast-Cec7KbOn.mjs";
|
|
4
|
+
import { r as ContractSourceDiagnostic } from "./config-types-CWeyMWBV.mjs";
|
|
5
|
+
import { n as TokenKind, t as Token } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
6
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/parse-DZRO_CK2.d.mts
|
|
7
7
|
//#region src/syntax/syntax-kind.d.ts
|
|
8
8
|
type SyntaxKind = 'Document' | 'ModelDeclaration' | 'CompositeTypeDeclaration' | 'Namespace' | 'TypesBlock' | 'GenericBlockDeclaration' | 'FieldDeclaration' | 'NamedTypeDeclaration' | 'KeyValuePair' | 'FieldAttribute' | 'ModelAttribute' | 'AttributeArgList' | 'AttributeArg' | 'TypeAnnotation' | 'Identifier' | 'QualifiedName' | 'FunctionCall' | 'ArrayLiteral' | 'StringLiteralExpr' | 'TaggedLiteral' | 'NumberLiteralExpr' | 'BooleanLiteralExpr' | 'ObjectLiteralExpr' | 'ObjectField';
|
|
9
9
|
//#endregion
|
|
@@ -442,7 +442,7 @@ declare class GenericBlockDeclarationAst implements BracedBlock {
|
|
|
442
442
|
lbrace(): SyntaxToken | undefined;
|
|
443
443
|
rbrace(): SyntaxToken | undefined;
|
|
444
444
|
entries(): Iterable<KeyValuePairAst>;
|
|
445
|
-
/** Field lines of a
|
|
445
|
+
/** Field lines of a `view` body. Empty for every other generic block. */
|
|
446
446
|
fields(): Iterable<FieldDeclarationAst>;
|
|
447
447
|
attributes(): Iterable<ModelAttributeAst>;
|
|
448
448
|
members(): Iterable<GenericBlockMemberAst>;
|
|
@@ -454,7 +454,7 @@ declare class KeyValuePairAst implements AstNode {
|
|
|
454
454
|
key(): IdentifierAst | undefined;
|
|
455
455
|
equals(): SyntaxToken | undefined;
|
|
456
456
|
value(): ExpressionAst | undefined;
|
|
457
|
-
/** `@` attributes after the key or value
|
|
457
|
+
/** `@` attributes after the key or value, as in `USER @map("user")`. */
|
|
458
458
|
attributes(): Iterable<FieldAttributeAst>;
|
|
459
459
|
static cast(node: SyntaxNode): KeyValuePairAst | undefined;
|
|
460
460
|
}
|
|
@@ -483,19 +483,11 @@ interface ParseResult {
|
|
|
483
483
|
readonly diagnostics: readonly ParseDiagnostic[];
|
|
484
484
|
readonly sources: PslSources;
|
|
485
485
|
}
|
|
486
|
-
type PslGrammar = 'psl' | 'prisma7';
|
|
487
|
-
interface ParseOptions {
|
|
488
|
-
/**
|
|
489
|
-
* `prisma7` also reads two Prisma 7 constructs: `@` attributes after an `enum` member, and field
|
|
490
|
-
* lines in a `view` body. Defaults to `psl`, which reads neither.
|
|
491
|
-
*/
|
|
492
|
-
readonly grammar?: PslGrammar;
|
|
493
|
-
}
|
|
494
486
|
/**
|
|
495
487
|
* Parses a full PSL document. Never throws — malformed input yields diagnostics
|
|
496
488
|
* and a recovered tree, not an exception.
|
|
497
489
|
*/
|
|
498
|
-
declare function parse(source: string, filename: string
|
|
490
|
+
declare function parse(source: string, filename: string): ParseResult;
|
|
499
491
|
//#endregion
|
|
500
|
-
export {
|
|
501
|
-
//# sourceMappingURL=parse-
|
|
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-D8YAg23m.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-DZRO_CK2-D8YAg23m.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,YAAY;iBACf,WAAW,MAAM,WAAW,eAAe;iBAC3C,UAAU,MAAM,YAAY,UAAU,cAAc,gBAAgB;;;;;;;;;;cAUvE,uBAAuB;WAC1B,OAAO;WACP,MAAM;WACN;WACA;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,YAAY,gBAAgB,QAAQ,YAAY;MAC/D;MACA;;EAEJ,SAAS;EACT,UAAU;;MAEN,sBAAsB;;MAEtB,sBAAsB;;MAEtB,aAAa;;MAEb,aAAa;;KAEd,gBAAgB,aAAa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,UAAU;EACV,kBAAkB;EAClB,cAAc,SAAS;SAChB,KAAK,MAAM,aAAa;;;;KAI5B,kBAAkB;UACb;WACC,UAAU;WACV,sBAAsB;WACtB,SAAS;;;;;;iBAMH,MAAM,gBAAgB,mBAAmB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import { r as UNSPECIFIED_PSL_NAMESPACE_ID } from "./psl-ast-DYtFdynZ.mjs";
|
|
3
|
+
import { r as isTerminatedStringLiteral, t as Tokenizer } from "./tokenizer-BMz7z2KR-J0yZ4im3.mjs";
|
|
4
|
+
import { a as createSyntaxTree } from "./ast-helpers-2XRnkQEO-BxG5qx3Q.mjs";
|
|
5
|
+
import { o as DocumentAst } from "./declarations-43E1JFHg-DGBa0YH_.mjs";
|
|
6
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/parse-Km2Ne67K.mjs
|
|
6
7
|
const CARRIAGE_RETURN = 13;
|
|
7
8
|
const LINE_FEED = 10;
|
|
8
9
|
var SourceFile = class {
|
|
@@ -176,7 +177,7 @@ const TRIVIA_KINDS = /* @__PURE__ */ new Set([
|
|
|
176
177
|
"Comment"
|
|
177
178
|
]);
|
|
178
179
|
/**
|
|
179
|
-
* The fault-tolerant parser substrate the
|
|
180
|
+
* The fault-tolerant parser substrate the parse functions below drive. Trivia is flushed
|
|
180
181
|
* into the enclosing open node, so every child node spans exactly its first
|
|
181
182
|
* through last significant token.
|
|
182
183
|
*/
|
|
@@ -519,9 +520,9 @@ function parseTypeAnnotation(cursor) {
|
|
|
519
520
|
* Parses a full PSL document. Never throws — malformed input yields diagnostics
|
|
520
521
|
* and a recovered tree, not an exception.
|
|
521
522
|
*/
|
|
522
|
-
function parse(source, filename
|
|
523
|
+
function parse(source, filename) {
|
|
523
524
|
const cursor = new Cursor(filename, source);
|
|
524
|
-
const root = createSyntaxTree(parseDocument(cursor
|
|
525
|
+
const root = createSyntaxTree(parseDocument(cursor));
|
|
525
526
|
const document = DocumentAst.cast(root) ?? new DocumentAst(root);
|
|
526
527
|
const sources = new PslSources([[document.syntax, cursor.sourceFile]]);
|
|
527
528
|
return {
|
|
@@ -530,9 +531,9 @@ function parse(source, filename, options = {}) {
|
|
|
530
531
|
sources
|
|
531
532
|
};
|
|
532
533
|
}
|
|
533
|
-
function parseDocument(cursor
|
|
534
|
+
function parseDocument(cursor) {
|
|
534
535
|
cursor.startNode("Document");
|
|
535
|
-
while (cursor.peekKind() !== "Eof") parseDeclaration(cursor, false
|
|
536
|
+
while (cursor.peekKind() !== "Eof") parseDeclaration(cursor, false);
|
|
536
537
|
cursor.flushTrivia();
|
|
537
538
|
return cursor.finishNode();
|
|
538
539
|
}
|
|
@@ -551,12 +552,12 @@ function keywordIs(cursor, keyword) {
|
|
|
551
552
|
* Recovery runs via the `if (!node)` tail rather than as a `??` arm, because it
|
|
552
553
|
* appends raw tokens to the open parent instead of returning a child node.
|
|
553
554
|
*/
|
|
554
|
-
function parseDeclaration(cursor, insideNamespace
|
|
555
|
+
function parseDeclaration(cursor, insideNamespace) {
|
|
555
556
|
const name = cursor.peekKind(1) === "Ident" ? cursor.peekToken(1).text : "";
|
|
556
557
|
if (insideNamespace && keywordIs(cursor, "namespace")) cursor.diagnostic("PSL_INVALID_NAMESPACE_BLOCK", `Recursive "namespace ${name}" block is not allowed; namespace blocks may not nest`, cursor.mark());
|
|
557
558
|
else 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());
|
|
558
559
|
else if (keywordIs(cursor, "namespace") && name === "__unspecified__") 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));
|
|
559
|
-
if (!(parseModel(cursor) ?? parseNamespace(cursor
|
|
560
|
+
if (!(parseModel(cursor) ?? parseNamespace(cursor) ?? parseCompositeType(cursor) ?? parseTypesBlock(cursor) ?? parseGenericBlock(cursor))) parseUnsupportedTopLevel(cursor);
|
|
560
561
|
}
|
|
561
562
|
/**
|
|
562
563
|
* Reports only the first missing piece — a missing name suppresses the
|
|
@@ -584,12 +585,8 @@ function parseModel(cursor) {
|
|
|
584
585
|
* {` with no name) routed to its dedicated parser. The generic keyword set is
|
|
585
586
|
* open, so a bare identifier with no brace (e.g. `oops`) is read as an unfinished
|
|
586
587
|
* custom declaration rather than unsupported content.
|
|
587
|
-
*
|
|
588
|
-
* With the `prisma7` grammar, a `view` block stays a generic block (so interpreters keep rejecting
|
|
589
|
-
* the keyword), but its body is read like a model body, so the field lines parse as
|
|
590
|
-
* `FieldDeclaration` nodes with spans instead of mangled entries.
|
|
591
588
|
*/
|
|
592
|
-
function parseGenericBlock(cursor
|
|
589
|
+
function parseGenericBlock(cursor) {
|
|
593
590
|
if (cursor.peekKind() !== "Ident") return void 0;
|
|
594
591
|
const keyword = cursor.peekToken().text;
|
|
595
592
|
if (RESERVED_BLOCK_KEYWORDS.has(keyword)) return void 0;
|
|
@@ -597,16 +594,16 @@ function parseGenericBlock(cursor, grammar = "psl") {
|
|
|
597
594
|
cursor.startNode("GenericBlockDeclaration");
|
|
598
595
|
cursor.bump();
|
|
599
596
|
if (hasName) parseIdentifier(cursor);
|
|
600
|
-
if (cursor.peekKind() === "LBrace") parseBlockBody(cursor, genericBlockMemberParser(keyword
|
|
597
|
+
if (cursor.peekKind() === "LBrace") parseBlockBody(cursor, genericBlockMemberParser(keyword));
|
|
601
598
|
else {
|
|
602
599
|
cursor.diagnostic("PSL_INVALID_DECLARATION", `Expected "{" to open the "${keyword}" block`, cursor.markAfterLastToken());
|
|
603
600
|
cursor.recoverToSyncPoint();
|
|
604
601
|
}
|
|
605
602
|
return cursor.finishNode();
|
|
606
603
|
}
|
|
607
|
-
function parseNamespace(cursor
|
|
604
|
+
function parseNamespace(cursor) {
|
|
608
605
|
if (!keywordIs(cursor, "namespace")) return void 0;
|
|
609
|
-
return parseBlock(cursor, "Namespace", true, (inner) => parseDeclaration(inner, true
|
|
606
|
+
return parseBlock(cursor, "Namespace", true, (inner) => parseDeclaration(inner, true));
|
|
610
607
|
}
|
|
611
608
|
function parseCompositeType(cursor) {
|
|
612
609
|
if (!keywordIs(cursor, "type")) return void 0;
|
|
@@ -651,13 +648,13 @@ function parseNamedTypeMember(cursor) {
|
|
|
651
648
|
if (!parseNamedType(cursor)) invalidMember(cursor, "PSL_INVALID_TYPES_MEMBER", `Invalid types declaration "${cursor.peekToken().text}"`);
|
|
652
649
|
}
|
|
653
650
|
/**
|
|
654
|
-
*
|
|
655
|
-
* carry `@` attributes (`USER @map("user")`).
|
|
656
|
-
*
|
|
651
|
+
* A `view` body is read like a model body. Every other generic block reads `key = value` entries
|
|
652
|
+
* and bare keys, and in an `enum` block those may carry `@` attributes (`USER @map("user")`). Each
|
|
653
|
+
* interpreter decides whether it accepts the block and its members.
|
|
657
654
|
*/
|
|
658
|
-
function genericBlockMemberParser(keyword
|
|
659
|
-
if (
|
|
660
|
-
if (
|
|
655
|
+
function genericBlockMemberParser(keyword) {
|
|
656
|
+
if (keyword === "view") return parseModelMember;
|
|
657
|
+
if (keyword === "enum") return parseEnumMember;
|
|
661
658
|
return parseKeyValueMember;
|
|
662
659
|
}
|
|
663
660
|
/**
|
|
@@ -701,9 +698,9 @@ function parseNamedType(cursor) {
|
|
|
701
698
|
}
|
|
702
699
|
/**
|
|
703
700
|
* A generic-block entry is either `key = value` or a bare `key` (committing a
|
|
704
|
-
* `KeyValuePair` carrying only the key). With `memberAttributes` (enum blocks
|
|
705
|
-
*
|
|
706
|
-
*
|
|
701
|
+
* `KeyValuePair` carrying only the key). With `memberAttributes` (enum blocks) any number of `@`
|
|
702
|
+
* attributes may follow, as in `USER @map("user")`. A `key =` with no following expression is
|
|
703
|
+
* flagged.
|
|
707
704
|
*/
|
|
708
705
|
function parseKeyValue(cursor, options = { memberAttributes: false }) {
|
|
709
706
|
if (cursor.peekKind() !== "Ident") return void 0;
|
|
@@ -719,4 +716,4 @@ function parseKeyValue(cursor, options = { memberAttributes: false }) {
|
|
|
719
716
|
//#endregion
|
|
720
717
|
export { greenToken as a, greenNode as i, PslSources as n, parse as o, SourceFile as r, GreenNodeBuilder as t };
|
|
721
718
|
|
|
722
|
-
//# sourceMappingURL=parse-
|
|
719
|
+
//# sourceMappingURL=parse-Km2Ne67K-CakfHP9f.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-Km2Ne67K-CakfHP9f.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-Km2Ne67K.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-43E1JFHg.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-Km2Ne67K.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,IAAI,YAAY;EACf,OAAO,KAAKC,YAAY;CACzB;CACA,mBAAmB;EAClB,OAAO,KAAKA;CACb;CACA,gBAAgB,MAAM;EACrB,IAAI,QAAQ,GAAG,OAAO;EACtB,OAAO,KAAKA,YAAY,SAAS,KAAKD,MAAM;CAC7C;CACA,cAAc,MAAM;EACnB,IAAI,OAAO,GAAG,OAAO;EACrB,MAAM,gBAAgB,KAAKC,YAAY,OAAO;EAC9C,IAAI,kBAAkB,KAAK,GAAG,OAAO,KAAKD,MAAM;EAChD,MAAM,iBAAiB,gBAAgB;EACvC,MAAM,uBAAuB,iBAAiB;EAC9C,OAAO,KAAKA,MAAM,WAAW,oBAAoB,MAAM,kBAAkB,uBAAuB;CACjG;CACA,WAAW,QAAQ;EAClB,MAAM,UAAU,MAAM,QAAQ,GAAG,KAAKA,MAAM,MAAM;EAClD,MAAM,OAAO,KAAKE,aAAa,OAAO;EACtC,OAAO;GACN;GACA,WAAW,UAAU,KAAKC,aAAa,IA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,OAAO,WAAW;AAC1B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as CodecLookup } from "./codec-types-C4Bx6jXr-C2MBP0-0.mjs";
|
|
2
2
|
import { N as ContributedPslDiagnosticCode, X as PslDiagnosticCode, Z as PslExtensionBlock, ct as PslSpan, w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
|
|
3
|
-
//#region ../../../1-framework/1-core/framework-components/dist/psl-ast-
|
|
3
|
+
//#region ../../../1-framework/1-core/framework-components/dist/psl-ast-BePuKena.d.mts
|
|
4
4
|
//#region src/control/psl-ast.d.ts
|
|
5
5
|
interface PslDiagnostic {
|
|
6
6
|
/**
|
|
@@ -147,6 +147,11 @@ interface PslTypesBlock {
|
|
|
147
147
|
* (or whether) to map the PSL bucket to the IR sentinel.
|
|
148
148
|
*/
|
|
149
149
|
declare const UNSPECIFIED_PSL_NAMESPACE_ID = "__unspecified__";
|
|
150
|
+
/**
|
|
151
|
+
* The name the unbound namespace is written under in PSL: `namespace unbound { … }`. Readers map it
|
|
152
|
+
* to the IR's `__unbound__` namespace id, and writers map that id back to it.
|
|
153
|
+
*/
|
|
154
|
+
declare const UNBOUND_PSL_NAMESPACE_NAME = "unbound";
|
|
150
155
|
/** A value in {@link PslNamespace.entries}: a built-in entity node or an extension-contributed {@link PslExtensionBlock}. */
|
|
151
156
|
type PslNamespaceEntry = PslModel | PslCompositeType | PslExtensionBlock;
|
|
152
157
|
/**
|
|
@@ -255,5 +260,5 @@ interface ParsePslDocumentResult {
|
|
|
255
260
|
readonly ok: boolean;
|
|
256
261
|
}
|
|
257
262
|
//#endregion
|
|
258
|
-
export {
|
|
259
|
-
//# sourceMappingURL=psl-ast-
|
|
263
|
+
export { flatPslModels as A, PslReferentialAction as C, UNBOUND_PSL_NAMESPACE_NAME as D, PslUniqueConstraint as E, makePslNamespaceEntries as M, namespacePslExtensionBlocks as N, UNSPECIFIED_PSL_NAMESPACE_ID as O, PslNamespaceEntry as S, PslTypesBlock as T, PslIndexConstraint as _, PslAttributeArgument as a, PslNamedTypeDeclaration as b, PslAttributeTarget as c, PslDefaultLiteralValue as d, PslDefaultValue as f, PslFieldAttribute as g, PslField as h, PslAttribute as i, makePslNamespace as j, flatPslCompositeTypes as k, PslCompositeType as l, PslDocumentAst as m, ParsePslDocumentInput as n, PslAttributeNamedArgument as o, PslDiagnostic as p, ParsePslDocumentResult as r, PslAttributePositionalArgument as s, BUILTIN_PSL_KIND_KEYS as t, PslDefaultFunctionValue as u, PslModel as v, PslTypeConstructorCall as w, PslNamespace as x, PslModelAttribute as y };
|
|
264
|
+
//# sourceMappingURL=psl-ast-BePuKena-AYNqFKCE.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-ast-
|
|
1
|
+
{"version":3,"file":"psl-ast-BePuKena-AYNqFKCE.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/psl-ast-BePuKena.d.mts"],"mappings":";;;;UAGU;;;;;;;;;;;WAWC,MAAM,oBAAoB;WAC1B;WACA;WACA,MAAM;;UAEP;WACC;WACA;;UAED;WACC;WACA;;KAEN,kBAAkB,0BAA0B;KAC5C;UACK;WACC;WACA;WACA,MAAM;;UAEP;WACC;WACA;WACA;WACA,MAAM;;KAEZ,uBAAuB,iCAAiC;UACnD;WACC;WACA;WACA,eAAe;WACf,MAAM;;UAEP;WACC;WACA,QAAQ;WACR;WACA,eAAe;WACf,MAAM;;KAEZ;KACA,oBAAoB;UACf;WACC;WACA;;WAEA;;WAEA;;;;;;;;;WASA;WACA,kBAAkB;WAClB;WACA;WACA;WACA,qBAAqB;WACrB,MAAM;;UAEP;WACC;WACA;WACA,MAAM;;UAEP;WACC;WACA;WACA,MAAM;;KAEZ,oBAAoB;UACf;WACC;WACA;WACA,iBAAiB;WACjB,qBAAqB;WACrB,MAAM;;;;;;;;WAQN;;;;;;;UAOD;WACC;WACA;WACA,iBAAiB;WACjB,qBAAqB;WACrB,MAAM;;UAEP;WACC;WACA;;;;;;WAMA;WACA,kBAAkB;WAClB,qBAAqB;WACrB,MAAM;;UAEP;WACC;WACA,uBAAuB;WACvB,MAAM;;;;;;;;;;;;;;cAcH;;;;;cAKA;;KAET,oBAAoB,WAAW,mBAAmB;;;;;;;;;;;;UAY7C;WACC;WACA;;WAEA,SAAS,SAAS,eAAe,SAAS,eAAe;;WAEzD,iBAAiB;;WAEjB,yBAAyB;WACzB,MAAM;;;iBAGA,iBAAiB;WACvB;WACA;WACA,SAAS,SAAS,eAAe,SAAS,eAAe;WACzD,MAAM;IACb;;;;;;iBAMa,wBAAwB,iBAAiB,YAAY,yBAAyB,oBAAoB,0BAA0B,sBAAsB,SAAS,eAAe,SAAS,eAAe;UACzM;WACC;WACA;WACA,qBAAqB;WACrB,QAAQ;WACR,MAAM;;;;;;iBAMA,cAAc,KAAK,0BAA0B;;;;iBAI7C,sBAAsB,KAAK,0BAA0B;;;;;;;;;;;cAWxD,uBAAuB;;;;;;;;;iBASpB,4BAA4B,IAAI,wBAAwB;UAC/D;WACC;WACA;;;;;;;;;;;;;;;;WAgBA,sBAAsB;;;;;;;;;WAStB,cAAc;;UAEf;WACC,KAAK;WACL,sBAAsB;WACtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as CodecLookup } from "./codec-types-C4Bx6jXr-C2MBP0-0.mjs";
|
|
2
2
|
import { C as AuthoringPslBlockDescriptor, Z as PslExtensionBlock } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
|
|
3
|
-
import { p as PslDiagnostic, x as PslNamespace } from "./psl-ast-
|
|
3
|
+
import { p as PslDiagnostic, x as PslNamespace } from "./psl-ast-BePuKena-AYNqFKCE.mjs";
|
|
4
4
|
//#region ../../../1-framework/1-core/framework-components/dist/psl-ast.d.mts
|
|
5
5
|
//#region src/control/psl-extension-block-validator.d.ts
|
|
6
6
|
/**
|
|
@@ -34,4 +34,4 @@ interface ExtensionBlockRefResolutionContext {
|
|
|
34
34
|
declare function validateExtensionBlock(node: PslExtensionBlock, descriptor: AuthoringPslBlockDescriptor, sourceId: string, codecLookup: CodecLookup, refCtx?: ExtensionBlockRefResolutionContext): readonly PslDiagnostic[];
|
|
35
35
|
//#endregion
|
|
36
36
|
export { validateExtensionBlock as n, ExtensionBlockRefResolutionContext as t };
|
|
37
|
-
//# sourceMappingURL=psl-ast-
|
|
37
|
+
//# sourceMappingURL=psl-ast-Cec7KbOn.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-ast-
|
|
1
|
+
{"version":3,"file":"psl-ast-Cec7KbOn.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/psl-ast.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;WACC,gBAAgB;WAChB,wBAAwB;;;;;;;;;;;;;;;;;;iBAkBlB,uBAAuB,MAAM,mBAAmB,YAAY,6BAA6B,kBAAkB,aAAa,aAAa,SAAS,8CAA8C"}
|
|
@@ -14,6 +14,11 @@ import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
|
14
14
|
*/
|
|
15
15
|
const UNSPECIFIED_PSL_NAMESPACE_ID = "__unspecified__";
|
|
16
16
|
/**
|
|
17
|
+
* The name the unbound namespace is written under in PSL: `namespace unbound { … }`. Readers map it
|
|
18
|
+
* to the IR's `__unbound__` namespace id, and writers map that id back to it.
|
|
19
|
+
*/
|
|
20
|
+
const UNBOUND_PSL_NAMESPACE_NAME = "unbound";
|
|
21
|
+
/**
|
|
17
22
|
* Stores `entries`; exposes `models`/`enums`/`compositeTypes` as getters over
|
|
18
23
|
* it. The getters are prototype members (non-enumerable), so spreading or
|
|
19
24
|
* `JSON.stringify`-ing a namespace copies only `entries`, never a duplicate view.
|
|
@@ -234,6 +239,6 @@ function resolveEntityInNamespaces(name, refKind, namespaces) {
|
|
|
234
239
|
return false;
|
|
235
240
|
}
|
|
236
241
|
//#endregion
|
|
237
|
-
export {
|
|
242
|
+
export { flatPslModels as a, namespacePslExtensionBlocks as c, flatPslCompositeTypes as i, validateExtensionBlock as l, UNBOUND_PSL_NAMESPACE_NAME as n, makePslNamespace as o, UNSPECIFIED_PSL_NAMESPACE_ID as r, makePslNamespaceEntries as s, BUILTIN_PSL_KIND_KEYS as t };
|
|
238
243
|
|
|
239
|
-
//# sourceMappingURL=psl-ast-
|
|
244
|
+
//# sourceMappingURL=psl-ast-DYtFdynZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"psl-ast-DYtFdynZ.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/psl-ast.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\n//#region src/control/psl-ast.ts\n/**\n* Name of the synthesised namespace bucket the framework parser uses for\n* top-level declarations that appear outside any `namespace { … }` block.\n* The double-underscore decoration signals that the identifier is parser-\n* synthesised and never appears in user-authored PSL source — writing\n* `namespace __unspecified__ { … }` is a parse error.\n*\n* Distinct from the IR sentinel `__unbound__`: the PSL bucket describes\n* syntactic absence at the parser layer; the IR sentinel describes a late-\n* bound storage slot at the IR layer. Per-target interpreters decide how\n* (or whether) to map the PSL bucket to the IR sentinel.\n*/\nconst UNSPECIFIED_PSL_NAMESPACE_ID = \"__unspecified__\";\n/**\n* The name the unbound namespace is written under in PSL: `namespace unbound { … }`. Readers map it\n* to the IR's `__unbound__` namespace id, and writers map that id back to it.\n*/\nconst UNBOUND_PSL_NAMESPACE_NAME = \"unbound\";\n/**\n* Stores `entries`; exposes `models`/`enums`/`compositeTypes` as getters over\n* it. The getters are prototype members (non-enumerable), so spreading or\n* `JSON.stringify`-ing a namespace copies only `entries`, never a duplicate view.\n*/\nvar PslNamespaceNode = class {\n\tkind = \"namespace\";\n\tname;\n\tentries;\n\tspan;\n\tconstructor(init) {\n\t\tthis.name = init.name;\n\t\tthis.entries = init.entries;\n\t\tthis.span = init.span;\n\t\tObject.freeze(this);\n\t}\n\tget models() {\n\t\treturn blindCast(Object.values(this.entries[\"model\"] ?? {}));\n\t}\n\tget compositeTypes() {\n\t\treturn blindCast(Object.values(this.entries[\"compositeType\"] ?? {}));\n\t}\n};\n/** Constructs a {@link PslNamespace}. Use this, never a namespace literal — the accessors must derive from `entries`. */\nfunction makePslNamespace(init) {\n\treturn new PslNamespaceNode(init);\n}\n/**\n* Builds the frozen `entries[kind][name]` container from per-kind arrays.\n* Built-ins key on their PSL keyword; extension blocks key on their `kind`\n* discriminator. Call this rather than hand-building the literal.\n*/\nfunction makePslNamespaceEntries(models, compositeTypes, extensionBlocks) {\n\tconst container = {};\n\tif (models.length > 0) {\n\t\tconst map = {};\n\t\tfor (const m of models) map[m.name] = m;\n\t\tcontainer[\"model\"] = Object.freeze(map);\n\t}\n\tif (compositeTypes.length > 0) {\n\t\tconst map = {};\n\t\tfor (const ct of compositeTypes) map[ct.name] = ct;\n\t\tcontainer[\"compositeType\"] = Object.freeze(map);\n\t}\n\tfor (const block of extensionBlocks) {\n\t\tconst existing = container[block.kind];\n\t\tconst newMap = existing ? blindCast({ ...existing }) : {};\n\t\tnewMap[block.name] = block;\n\t\tcontainer[block.kind] = Object.freeze(newMap);\n\t}\n\treturn Object.freeze(container);\n}\n/**\n* Returns all models from every namespace in document order. Convenience\n* for consumers that don't (yet) need namespace-awareness.\n*/\nfunction flatPslModels(ast) {\n\treturn ast.namespaces.flatMap((ns) => blindCast(Object.values(ns.entries[\"model\"] ?? {})));\n}\n/**\n* Returns all composite types from every namespace in document order.\n*/\nfunction flatPslCompositeTypes(ast) {\n\treturn ast.namespaces.flatMap((ns) => blindCast(Object.values(ns.entries[\"compositeType\"] ?? {})));\n}\n/**\n* The set of `entries` kind keys that the framework parser reserves for\n* built-in PSL entity kinds. Any own-enumerable key on `PslNamespace.entries`\n* that is **not** in this set was contributed by an extension-block descriptor.\n*\n* Built-in keys match the PSL keyword used on each block type:\n* `'model'`, `'compositeType'`. The `'enum'` keyword is claimed by the\n* extension-block grammar via a registered descriptor, so `entries['enum']`\n* holds `PslExtensionBlock` nodes and is returned by `namespacePslExtensionBlocks`.\n*/\nconst BUILTIN_PSL_KIND_KEYS = /* @__PURE__ */ new Set([\"model\", \"compositeType\"]);\n/**\n* Returns all extension-contributed blocks in the given namespace, in\n* insertion order (the order the parser encountered them in the source).\n*\n* Reads from `namespace.entries`, skipping the built-in kind keys\n* (`'model'`, `'compositeType'`). All remaining kind maps contain\n* only `PslExtensionBlock` nodes by construction (see `makePslNamespaceEntries`).\n*/\nfunction namespacePslExtensionBlocks(ns) {\n\tconst result = [];\n\tfor (const [kindKey, kindMap] of Object.entries(ns.entries)) {\n\t\tif (BUILTIN_PSL_KIND_KEYS.has(kindKey)) continue;\n\t\tfor (const entry of Object.values(kindMap)) result.push(blindCast(entry));\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/control/psl-extension-block-validator.ts\n/**\n* Validate a single parsed extension block against its descriptor.\n*\n* Returns an array of {@link PslDiagnostic} objects (possibly empty). The\n* caller is responsible for threading `sourceId` into each returned diagnostic\n* — the returned objects already have `sourceId` set from the `sourceId`\n* parameter.\n*\n* @param node - The parsed block node produced by the generic framework parser.\n* @param descriptor - The descriptor that claims this block's keyword.\n* @param sourceId - The PSL source file identifier (threaded into diagnostics).\n* @param codecLookup - Used to validate `value`-kind parameter literals via\n* `codecLookup.get(codecId)?.decodeJson(JSON.parse(raw))`.\n* @param refCtx - Namespace context for `ref`-kind scope resolution. Required\n* when any descriptor parameter is `kind: 'ref'`; may be omitted if none are.\n*/\nfunction validateExtensionBlock(node, descriptor, sourceId, codecLookup, refCtx) {\n\tconst diagnostics = [];\n\tconst descriptorKeys = new Set(Object.keys(descriptor.parameters));\n\tconst nodeKeys = new Set(Object.keys(node.parameters));\n\tif (!descriptor.variadicParameters) {\n\t\tfor (const key of nodeKeys) if (!descriptorKeys.has(key)) {\n\t\t\tconst captured = node.parameters[key];\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_UNKNOWN_PARAMETER\",\n\t\t\t\tmessage: `Unknown parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\". The descriptor does not declare this parameter.`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: captured?.span ?? node.span\n\t\t\t});\n\t\t}\n\t}\n\tfor (const [key, param] of Object.entries(descriptor.parameters)) if (param.required === true && !nodeKeys.has(key)) diagnostics.push({\n\t\tcode: \"PSL_EXTENSION_MISSING_REQUIRED_PARAMETER\",\n\t\tmessage: `Required parameter \"${key}\" is missing from \"${descriptor.keyword}\" block \"${node.name}\".`,\n\t\tsourceId,\n\t\tspan: node.span\n\t});\n\tfor (const [key, param] of Object.entries(descriptor.parameters)) {\n\t\tconst captured = node.parameters[key];\n\t\tif (captured === void 0) continue;\n\t\tvalidateParam(node, descriptor, key, param, captured, sourceId, codecLookup, refCtx, diagnostics);\n\t}\n\treturn diagnostics;\n}\nfunction validateParam(node, descriptor, key, param, captured, sourceId, codecLookup, refCtx, diagnostics) {\n\tswitch (param.kind) {\n\t\tcase \"option\":\n\t\t\tif (captured.kind !== \"option\") return;\n\t\t\tif (!param.values.includes(captured.token)) diagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_OPTION_OUT_OF_SET\",\n\t\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" has value \"${captured.token}\" which is not one of the allowed values: ${param.values.map((v) => `\"${v}\"`).join(\", \")}.`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: captured.span\n\t\t\t});\n\t\t\treturn;\n\t\tcase \"value\": {\n\t\t\tif (captured.kind !== \"value\") return;\n\t\t\tconst codec = codecLookup.get(param.codecId);\n\t\t\tif (codec === void 0) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" references unknown codec \"${param.codecId}\".`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: captured.span\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet jsonValue;\n\t\t\ttry {\n\t\t\t\tjsonValue = JSON.parse(captured.raw);\n\t\t\t} catch {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" is not a valid JSON literal (expected a JSON string, number, boolean, or null): ${captured.raw}`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: captured.span\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tcodec.decodeJson(blindCast(jsonValue));\n\t\t\t} catch (err) {\n\t\t\t\tconst reason = err instanceof Error ? err.message : String(err);\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" was rejected by codec \"${param.codecId}\": ${reason}`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: captured.span\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tcase \"ref\":\n\t\t\tif (captured.kind !== \"ref\") return;\n\t\t\tvalidateRef(node, descriptor, key, param, captured.identifier, captured.span, sourceId, refCtx, diagnostics);\n\t\t\treturn;\n\t\tcase \"list\":\n\t\t\tif (captured.kind !== \"list\") return;\n\t\t\tfor (const item of captured.items) validateParam(node, descriptor, key, param.of, item, sourceId, codecLookup, refCtx, diagnostics);\n\t\t\treturn;\n\t}\n}\nfunction validateRef(node, descriptor, key, param, identifier, span, sourceId, refCtx, diagnostics) {\n\tif (param.scope === \"cross-space\") return;\n\tif (refCtx === void 0) return;\n\tconst namespacesToSearch = param.scope === \"same-namespace\" ? [refCtx.ownerNamespace] : refCtx.allNamespaces;\n\tif (!resolveEntityInNamespaces(identifier, param.refKind, namespacesToSearch)) {\n\t\tconst scopeLabel = param.scope === \"same-namespace\" ? \"the same namespace\" : \"any namespace in the schema\";\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_EXTENSION_UNRESOLVED_REF\",\n\t\t\tmessage: `Parameter \"${key}\" in \"${descriptor.keyword}\" block \"${node.name}\" refers to \"${identifier}\" (expected ${param.refKind}), but no entity with that name and kind was found in ${scopeLabel}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t}\n}\n/**\n* True if an entity named `name` of kind `refKind` exists in any of the given\n* namespaces. Built-in and extension kinds resolve the same way, through\n* `entries[refKind]`.\n*/\nfunction resolveEntityInNamespaces(name, refKind, namespaces) {\n\tfor (const ns of namespaces) {\n\t\tconst kindMap = ns.entries[refKind];\n\t\tif (kindMap !== void 0 && Object.hasOwn(kindMap, name)) return true;\n\t}\n\treturn false;\n}\n//#endregion\nexport { BUILTIN_PSL_KIND_KEYS, UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, flatPslCompositeTypes, flatPslModels, makePslNamespace, makePslNamespaceEntries, namespacePslExtensionBlocks, validateExtensionBlock };\n\n//# sourceMappingURL=psl-ast.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,+BAA+B;;;;;AAKrC,MAAM,6BAA6B;;;;;;AAMnC,IAAI,mBAAmB,MAAM;CAC5B,OAAO;CACP;CACA;CACA;CACA,YAAY,MAAM;EACjB,KAAK,OAAO,KAAK;EACjB,KAAK,UAAU,KAAK;EACpB,KAAK,OAAO,KAAK;EACjB,OAAO,OAAO,IAAI;CACnB;CACA,IAAI,SAAS;EACZ,OAAO,UAAU,OAAO,OAAO,KAAK,QAAQ,YAAY,CAAC,CAAC,CAAC;CAC5D;CACA,IAAI,iBAAiB;EACpB,OAAO,UAAU,OAAO,OAAO,KAAK,QAAQ,oBAAoB,CAAC,CAAC,CAAC;CACpE;AACD;;AAEA,SAAS,iBAAiB,MAAM;CAC/B,OAAO,IAAI,iBAAiB,IAAI;AACj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AAK,OAAO,YAAY,MAAM,UAAU,QAAQ,aAAa;CACnG,IAAI,MAAM,UAAU,eAAe;CACnC,IAAI,WAAW,KAAK,GAAG;CACvB,MAAM,qBAAqB,MAAM,UAAU,mBAAmB,CAAC,OAAO,cAAc,IAAI,OAAO;CAC/F,IAAI,CAAC,0BAA0B,YAAY,MAAM,SAAS,kBAAkB,GAAG;EAC9E,MAAM,aAAa,MAAM,UAAU,mBAAmB,uBAAuB;EAC7E,YAAY,KAAK;GAChB,MAAM;GACN,SAAS,cAAc,IAAI,QAAQ,WAAW,QAAQ,WAAW,KAAK,KAAK,eAAe,WAAW,cAAc,MAAM,QAAQ,wDAAwD,WAAW;GACpM;GACA;EACD,CAAC;CACF;AACD;;;;;;AAMA,SAAS,0BAA0B,MAAM,SAAS,YAAY;CAC7D,KAAK,MAAM,MAAM,YAAY;EAC5B,MAAM,UAAU,GAAG,QAAQ;EAC3B,IAAI,YAAY,KAAK,KAAK,OAAO,OAAO,SAAS,IAAI,GAAG,OAAO;CAChE;CACA,OAAO;AACR"}
|
package/dist/psl-parser.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { f as CodecLookup } from "./codec-types-C4Bx6jXr-C2MBP0-0.mjs";
|
|
2
2
|
import { $ as PslExtensionBlockAttributeArg, A as AuthoringTypeNamespace, C as AuthoringPslBlockDescriptor, O as AuthoringTypeConstructorDescriptor, P as ControlDefaultRegistries, Q as PslExtensionBlockAttribute, X as PslDiagnosticCode, Z as PslExtensionBlock, at as PslExtensionBlockParamValue, ct as PslSpan, et as PslExtensionBlockParamBare, it as PslExtensionBlockParamScalarValue, nt as PslExtensionBlockParamOption, rt as PslExtensionBlockParamRef, st as PslPosition, tt as PslExtensionBlockParamList, w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
|
|
3
|
-
import "./authoring-
|
|
3
|
+
import "./authoring-BffMNBO5.mjs";
|
|
4
4
|
import "./codec-D5McQin0.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { A as flatPslModels, N as namespacePslExtensionBlocks, T as PslTypesBlock, a as PslAttributeArgument, b as PslNamedTypeDeclaration, c as PslAttributeTarget, d as PslDefaultLiteralValue, f as PslDefaultValue, g as PslFieldAttribute, h as PslField, i as PslAttribute, l as PslCompositeType, m as PslDocumentAst, o as PslAttributeNamedArgument, s as PslAttributePositionalArgument, u as PslDefaultFunctionValue, v as PslModel, w as PslTypeConstructorCall, x as PslNamespace, y as PslModelAttribute } from "./psl-ast-BePuKena-AYNqFKCE.mjs";
|
|
6
6
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import "./psl-ast-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { n as AssembledAuthoringContributions, vt as TaggedLiteralCanonicalization } from "./control-BTo8rNKi.mjs";
|
|
8
|
+
import "./psl-ast-Cec7KbOn.mjs";
|
|
9
|
+
import { i as isPslIdentifier } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
10
|
+
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-D8YAg23m.mjs";
|
|
11
|
+
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-CRtoii4t-DubuO_5j.mjs";
|
|
11
12
|
import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
|
|
12
13
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
|
|
13
14
|
//#region src/attribute-helpers.d.ts
|
|
@@ -443,10 +444,16 @@ declare function validateExtensionBlockFromSymbol(input: {
|
|
|
443
444
|
readonly codecLookup: CodecLookup;
|
|
444
445
|
}): readonly PslDiagnostic[];
|
|
445
446
|
//#endregion
|
|
447
|
+
//#region src/name-the-psl-source-loses.d.ts
|
|
448
|
+
/**
|
|
449
|
+
* A name that is lost when a PSL file is read. The parser keeps block members, and the PSL contract sources keep other names, as keys of plain objects, where assigning this key sets the object's prototype instead of adding a key. Code that writes PSL must not write this name anywhere a PSL source reads a name, including inside `@map` and `@@map`.
|
|
450
|
+
*/
|
|
451
|
+
declare const NAME_THE_PSL_SOURCE_LOSES = "__proto__";
|
|
452
|
+
//#endregion
|
|
446
453
|
//#region src/schema-directive.d.ts
|
|
447
454
|
declare function isPrismaNextSchema(text: string): boolean;
|
|
448
455
|
/** The document with the directive earlier releases wrote replaced by the current one. */
|
|
449
456
|
declare function renameLegacyDirective(text: string): string;
|
|
450
457
|
//#endregion
|
|
451
|
-
export { type ArgBindingSpec, type ArgType, type ArgTypeKind, type AssembledAttributeSpecs, type AttributeCtx, type AttributeLevel, type AttributeOut, type AttributeSpec, type AttributeSpecContext, type AttributeSpecNamespace, type AttributeSymbol, type Binder, type BinderResult, type BlockAttributeSpecFactory, type BlockSymbol, type BoundSpec, type BuildSymbolTableOptions, type CompositeTypeSymbol, type ContributedMember, type ContributedNamespaceSymbol, type ContributedTypeScope, type ContributedTypeSymbol, type CreateBinderOptions, type DeclarationFor, type DescribeUnsupportedAttribute, type DiagnosticSource, type EntityDeclaration, type EntityRefArgType, type EntitySelector, type FieldAttributeCtx, type FieldAttributeSpecContext, type FieldAttributeSpecFactory, type FieldSymbol, type FixedIdentifierArgType, type FuncCallSig, type IdentifierArgType, type InferAttr, type InspectableArgType, type ListOptions, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NumLiteral, type OptionalArgType, type OutOf, PSL_UNRESOLVED_REFERENCE, type Param, type ParsedTaggedLiteral, type PosOut, type PositionalParam, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslCompositeType, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDiagnosticCollector, type PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParamBare, type PslExtensionBlockParamList, type PslExtensionBlockParamOption, type PslExtensionBlockParamRef, type PslExtensionBlockParamScalarValue, type PslExtensionBlockParamValue, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslNamespace, type PslPosition, type PslSpan, type PslSymbol, type PslTypeConstructorCall, type PslTypesBlock, type RejectingArgType, type Resolution, type ResolvedAttribute, type ResolvedAttributeArg, type ResolvedEntityReference, type ResolvedNamedTypeBinding, type ResolvedTypeConstructorCall, type Scope, type ScopeResolution, type SymbolTable, type SymbolTableResult, type TaggedLiteralArgType, type TopLevelScope, type TypedFuncCall, type UnrestrictedIdentifierArgType, type UnsupportedAttribute, assembleAttributeSpecs, blockAttribute, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, isPrismaNextSchema, json, keywordPslSpan, leafDiagnostic, list, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, taggedLiteral, validateExtensionBlockFromSymbol };
|
|
458
|
+
export { type ArgBindingSpec, type ArgType, type ArgTypeKind, type AssembledAttributeSpecs, type AttributeCtx, type AttributeLevel, type AttributeOut, type AttributeSpec, type AttributeSpecContext, type AttributeSpecNamespace, type AttributeSymbol, type Binder, type BinderResult, type BlockAttributeSpecFactory, type BlockSymbol, type BoundSpec, type BuildSymbolTableOptions, type CompositeTypeSymbol, type ContributedMember, type ContributedNamespaceSymbol, type ContributedTypeScope, type ContributedTypeSymbol, type CreateBinderOptions, type DeclarationFor, type DescribeUnsupportedAttribute, type DiagnosticSource, type EntityDeclaration, type EntityRefArgType, type EntitySelector, type FieldAttributeCtx, type FieldAttributeSpecContext, type FieldAttributeSpecFactory, type FieldSymbol, type FixedIdentifierArgType, type FuncCallSig, type IdentifierArgType, type InferAttr, type InspectableArgType, type ListOptions, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, NAME_THE_PSL_SOURCE_LOSES, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NumLiteral, type OptionalArgType, type OutOf, PSL_UNRESOLVED_REFERENCE, type Param, type ParsedTaggedLiteral, type PosOut, type PositionalParam, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslCompositeType, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDiagnosticCollector, type PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParamBare, type PslExtensionBlockParamList, type PslExtensionBlockParamOption, type PslExtensionBlockParamRef, type PslExtensionBlockParamScalarValue, type PslExtensionBlockParamValue, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslNamespace, type PslPosition, type PslSpan, type PslSymbol, type PslTypeConstructorCall, type PslTypesBlock, type RejectingArgType, type Resolution, type ResolvedAttribute, type ResolvedAttributeArg, type ResolvedEntityReference, type ResolvedNamedTypeBinding, type ResolvedTypeConstructorCall, type Scope, type ScopeResolution, type SymbolTable, type SymbolTableResult, type TaggedLiteralArgType, type TopLevelScope, type TypedFuncCall, type UnrestrictedIdentifierArgType, type UnsupportedAttribute, assembleAttributeSpecs, blockAttribute, bool, buildSymbolTable, createBinder, createPslDiagnosticCollector, diagnosticFromSpan, diagnosticSource, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, isPrismaNextSchema, isPslIdentifier, json, keywordPslSpan, leafDiagnostic, list, mapPslDiagnostics, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, renameLegacyDirective, str, taggedLiteral, validateExtensionBlockFromSymbol };
|
|
452
459
|
//# sourceMappingURL=psl-parser.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.d.mts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"psl-parser.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;iBAUiB,sBAAsB,WAAW,cAAgB;iBACjD,yBAAyB;;;UAGhC;WACC;WACA;WACA;WACA,YAAY;;UAEb;WACC;WACA;WACA;WACA,SAAS,oBAAoB;;KAEnC,oBAAoB,wBAAwB;UACvC;EACR,OAAO,eAAe;;;;KAInB;WACM;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;WACR,YAAY;;WAEZ;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;WACA,QAAQ;;UAET;EACR,OAAO,eAAe;;;;cAIV;KACT,YAAY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