@cratis/screenplay-language 4.245.0 → 4.246.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SpecificationParser.js","names":["parseMappingSource","operationStepPrefix","pattern","operationStep","header","callerPersonaPattern","nativePattern","prefix","exactly","dotNetWhitespace","givenPattern","whenAppendPattern","whenPattern","thenEventPattern","thenQueryPrefix","readModelPrefix","givenReadModelPattern","thenReadModelPattern","thenNoPrefix","thenErrorPattern","stringBodyPattern","mappingPattern","nativeMappingPattern","givenTimeZonePrefix","givenTimeZonePattern","givenClockPrefix","givenCapturePrefix","givenGeneratedPrefix","givenGeneratedPattern","whenClockPrefix","whenTriggerPrefix","whenCapturePrefix","whenQueryPrefix","thenResultPrefix","noResultPrefix","whenRedeliveredPrefix","whenRedeliveredPattern","noEventsPrefix","clockPattern","whenTriggerPattern","capturePattern","whenQueryPattern","thenResultPattern","thenAbsentReadModelPattern","absentKeyStringPattern","thenQueryPattern","name","line","context","DiagnosticCodes","locationOf","description","parameters","cases","body","child","isFileDirective","keyword","firstWord","parameter","parseParameter","row","parseCase","parseDescription","_","_noEventsLine","members","specification","validateTable","action","query","outcome","match","values","value","parseConcreteMapping","rejectOperationChildren","unescapeString","pinned","capture","readModel","event","callerRolePattern","callerClaimPattern","authenticated","roles","claims","role","claim","containsCaseReference","appends","code","generatedValues","thenReturnsPrefix","expectation","parseReturn","caseValue","parseSpecificationValue","error","absent","key","exact","at","message","args","results","hasArguments","keyText","concrete","hasChildren","indent","location","source","parseConcrete","regex","expected","create","queryArguments","specificationStream","sourceStreamPattern","specificationStreamId","addInlineValue","parent","inline","eventSource","stream","noStream","hasRoute","generated","generatedFixturePrefix","fixture","generatedFixturePattern","mapping","addFixtureValue","eventKeyword","route","diagnosticText","streamId","streamIdParts","block","directiveLocations","parseRouteParts","part","nativeIdentifiers","queryArgumentsContext","existing"],"sources":["../../../../../../Compiler/Parsing/SpecificationParser.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { parseRouteParts } from './EventSourceParser';\nimport { diagnosticText } from '../Diagnostics/DiagnosticArgument';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { ExpressionSyntax, PropertyMappingSyntax } from '../Syntax/Expressions';\nimport {\n SpecificationCaptureSyntax, SpecificationClockSyntax, SpecificationTimeZoneSyntax, SpecificationGeneratedValueSyntax, SpecificationCommandSyntax, SpecificationErrorSyntax, SpecificationEventSyntax, SpecificationStreamSyntax, SpecificationNoStreamSyntax,\n SpecificationNoResultSyntax, SpecificationQueryResultSyntax, SpecificationReadModelSyntax, SpecificationSyntax, SpecificationTriggerSyntax,\n SpecificationWhenQuerySyntax, SpecificationCallerPersonaSyntax, SpecificationOperationFailureSyntax, SpecificationOperationSyntax, SpecificationCompensatedSyntax, SpecificationRedeliverySyntax,\n} from '../Syntax/Specifications';\nimport { SpecificationDeniedSyntax, SpecificationReturnSyntax } from '../Syntax/Responses';\nimport { dotNetWhitespace, nativePattern, pattern } from '../Text/patterns';\nimport { sourceStreamPattern } from '../Text/SourceStreamNames';\nimport { stringBodyPattern, unescapeString } from '../Text/StringLiteral';\nimport { containsCaseReference, parseCase, parseParameter, parseSpecificationValue as parseMappingSource, validateTable } from './SpecificationCaseParser';\nimport { parseDescription } from './DescriptionParser';\nimport { isFileDirective } from './FileReferences';\nimport { firstWord } from './LineText';\nimport { ParserContext } from './ParserContext';\nimport { addFixtureValue, addInlineValue } from './SpecificationExampleParser';\nimport { rejectOperationChildren } from './OperationParser';\nimport { generatedFixturePattern, generatedFixturePrefix, parseConcrete, parseConcreteMapping, parseReturn, thenReturnsPrefix } from './SpecificationResponseParser';\nimport { locationOf, SourceLine } from './SourceLine';\nimport { SpecificationAbsentReadModelSyntax, SpecificationCallerClaimSyntax, SpecificationCallerSyntax, SpecificationQuerySyntax } from '../Syntax/Specifications';\n\nconst operationStepPrefix = pattern('^(?:given\\\\s+operation|then\\\\s+(?:operation|compensated))(?:\\\\s|$)');\nconst operationStep = pattern('^(given operation|then operation|then compensated)\\\\s+([A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)*)(\\\\s+fails)?$');\nconst header = pattern('^specification\\\\s+([A-Za-z_]\\\\w*)$');\nconst callerPersonaPattern = pattern('^given caller as ([A-Za-z_]\\\\w*)$');\nconst stepName = '([A-Z]\\\\w*(?:\\\\.\\\\w+)*)';\nconst inlineAssignment = '(?:\\\\s+(?<property>[\\\\w.]+)\\\\s*=(?!=|>)\\\\s*(?<value>.+))?';\nconst stepPattern = (prefix: string, exactly = ''): RegExp => nativePattern(`^${prefix}\\\\s+${stepName}${exactly}${inlineAssignment}$`.replaceAll('\\\\s', dotNetWhitespace));\nconst givenPattern = stepPattern('given');\nconst whenAppendPattern = stepPattern('when\\\\s+append');\nconst whenPattern = stepPattern('when');\nconst thenEventPattern = stepPattern('then');\nconst thenQueryPrefix = pattern('^then\\\\s+query\\\\b');\nconst readModelPrefix = pattern('^(?:given|then)\\\\s+readmodel\\\\b');\nconst givenReadModelPattern = stepPattern('given\\\\s+readmodel');\nconst thenReadModelPattern = stepPattern('then\\\\s+readmodel', '(?<exactly>\\\\s+exactly)?');\nconst thenNoPrefix = pattern('^then\\\\s+no\\\\b');\nconst thenErrorPattern = pattern(`^then\\\\s+error\\\\s+\"(${stringBodyPattern})\"$`);\nconst mappingPattern = pattern('^([\\\\w.]+)\\\\s*=(?!=|>)\\\\s*(.+)$');\nconst nativeMappingPattern = nativePattern('^([\\\\w.]+)\\\\s*=(?!=|>)\\\\s*(.+)$');\nconst givenTimeZonePrefix = pattern('^given\\\\s+time\\\\s+zone\\\\b');\nconst givenTimeZonePattern = pattern(`^given\\\\s+time\\\\s+zone\\\\s+\"(${stringBodyPattern})\"$`);\nconst givenClockPrefix = pattern('^given\\\\s+clock\\\\b');\nconst givenCapturePrefix = pattern('^given\\\\s+capture\\\\b');\nconst givenGeneratedPrefix = pattern('^given\\\\s+generated\\\\b');\nconst givenGeneratedPattern = pattern('^given\\\\s+generated\\\\s+([A-Z]\\\\w*)\\\\.([a-z_]\\\\w*)\\\\s*=(?!=|>)\\\\s*(.+)$');\nconst whenClockPrefix = pattern('^when\\\\s+clock\\\\b');\nconst whenTriggerPrefix = pattern('^when\\\\s+trigger\\\\b');\nconst whenCapturePrefix = pattern('^when\\\\s+capture\\\\b');\nconst whenQueryPrefix = pattern('^when\\\\s+query\\\\b');\nconst thenResultPrefix = pattern('^then\\\\s+result\\\\b');\nconst noResultPrefix = pattern('^then\\\\s+no\\\\s+result\\\\b');\nconst whenRedeliveredPrefix = nativePattern('^when\\\\s+redelivered\\\\b');\nconst whenRedeliveredPattern = nativePattern('^when\\\\s+redelivered\\\\s+([A-Za-z_]\\\\w*(?:\\\\.\\\\w+)*)\\\\s+to\\\\s+([A-Za-z_]\\\\w*(?:\\\\.\\\\w+)*)$');\nconst noEventsPrefix = pattern('^then\\\\s+no\\\\s+events\\\\b');\n\n// An instant in ISO 8601 - a date, a time to the minute or finer, and an explicit offset or Z - so the same text\n// means the same moment wherever the specification runs.\nconst clockPattern = pattern('^(given|when)\\\\s+clock\\\\s+\"(\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}(?::\\\\d{2}(?:\\\\.\\\\d+)?)?(?:Z|[+-]\\\\d{2}:\\\\d{2}))\"$');\nconst whenTriggerPattern = pattern('^when\\\\s+trigger\\\\s+([A-Za-z_]\\\\w*)$');\nconst capturePattern = pattern('^(?:given|when)\\\\s+capture\\\\s+([A-Za-z_]\\\\w*)$');\nconst whenQueryPattern = pattern('^when\\\\s+query\\\\s+([A-Za-z_]\\\\w*(?:\\\\.\\\\w+)*)$');\nconst thenResultPattern = pattern('^then\\\\s+result(\\\\s+exactly)?$');\nconst thenAbsentReadModelPattern = nativePattern('^then\\\\s+no\\\\s+readmodel\\\\s+([A-Z]\\\\w*)\\\\s+for\\\\s+(.+)$');\nconst absentKeyStringPattern = nativePattern(`^(?:\"${stringBodyPattern}\"|'(?:[^'\\\\\\\\]|\\\\\\\\.)*')$`);\nconst thenQueryPattern = nativePattern('^then\\\\s+query\\\\s+([A-Za-z_]\\\\w*(?:\\\\.\\\\w+)*)(\\\\s+exactly)?$');\n\ninterface SpecificationBody {\n given: SpecificationEventSyntax[];\n givenReadModels: SpecificationReadModelSyntax[];\n when: SpecificationCommandSyntax | null;\n whenAppended: SpecificationEventSyntax | null;\n whenRedelivered: SpecificationRedeliverySyntax | null;\n whenDeclared: boolean;\n thenEvents: SpecificationEventSyntax[];\n thenEventsInAnyOrder: boolean;\n thenNoEvents: boolean;\n noEventsLine?: SourceLine;\n thenReadModels: SpecificationReadModelSyntax[];\n thenErrors: SpecificationErrorSyntax[];\n thenAbsentReadModels: SpecificationAbsentReadModelSyntax[];\n thenQueries: SpecificationQuerySyntax[];\n givenClock: SpecificationClockSyntax | null;\n givenTimeZone: SpecificationTimeZoneSyntax | null;\n givenCaptures: SpecificationCaptureSyntax[];\n givenGenerated?: SpecificationGeneratedValueSyntax[];\n whenClock: SpecificationClockSyntax | null;\n whenTrigger: SpecificationTriggerSyntax | null;\n whenCapture: SpecificationCaptureSyntax | null;\n whenQuery: SpecificationWhenQuerySyntax | null;\n thenResults: SpecificationQueryResultSyntax[];\n thenNoResult: SpecificationNoResultSyntax | null;\n thenDenied: SpecificationDeniedSyntax | null;\n givenCaller: SpecificationCallerSyntax | null;\n givenCallerPersona?: SpecificationCallerPersonaSyntax;\n thenReturns: SpecificationReturnSyntax | null;\n givenOperationFailures: SpecificationOperationFailureSyntax[];\n thenOperations: SpecificationOperationSyntax[];\n thenCompensated: SpecificationCompensatedSyntax[];\n}\n\nexport function parseSpecification(context: ParserContext, line: SourceLine): SpecificationSyntax {\n const name = header.exec(line.content)?.[1] ?? '';\n if (name === '') {\n context.error(DiagnosticCodes.InvalidSpecificationDeclaration, `Invalid specification declaration '${line.content}' - expected 'specification <Name>'`, locationOf(line));\n }\n let description: string | null = null;\n const parameters: NonNullable<SpecificationSyntax['parameters']>[number][] = [];\n const cases: NonNullable<SpecificationSyntax['cases']>[number][] = [];\n const body: SpecificationBody = {\n givenOperationFailures: [], thenOperations: [], thenCompensated: [], thenAbsentReadModels: [], thenQueries: [],\n given: [], givenReadModels: [], when: null, whenAppended: null, whenRedelivered: null, whenDeclared: false,\n thenEvents: [], thenEventsInAnyOrder: false, thenNoEvents: false, thenReadModels: [], thenErrors: [],\n givenClock: null, givenTimeZone: null, givenCaptures: [], whenClock: null, whenTrigger: null, whenCapture: null, whenQuery: null, thenResults: [], thenNoResult: null, thenDenied: null, givenCaller: null, thenReturns: null,\n };\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n if (isFileDirective(child)) {\n continue;\n }\n if (parseOperationStep(context, child, body)) continue;\n // Absence assertions admit any whitespace after 'then'; every other directive keeps its first word.\n const keyword = thenNoPrefix.test(child.content) ? 'then' : firstWord(child.content);\n if (keyword === 'parameter') {\n const parameter = parseParameter(context, child);\n if (parameter !== null) parameters.push(parameter);\n } else if (keyword === 'case') {\n const row = parseCase(context, child);\n if (row !== null) cases.push(row);\n } else if (keyword === 'description') {\n description = parseDescription(context, child, description, `Specification '${name}'`);\n } else if (keyword === 'given') {\n parseGiven(context, child, body);\n } else if (keyword === 'when') {\n parseWhen(context, child, body, name);\n } else if (keyword === 'then') {\n parseThen(context, child, body);\n } else {\n context.error(DiagnosticCodes.UnknownSpecificationDirective, `Unexpected '${firstWord(child.content)}' in specification body`, locationOf(child));\n context.skipBlock(child.indent);\n }\n }\n if (body.noEventsLine !== undefined && (body.thenEvents.length > 0 || body.thenEventsInAnyOrder || body.thenErrors.length > 0 || body.thenDenied !== null)) {\n context.error(DiagnosticCodes.InvalidNoEventsExpectation,\n \"'then no events' cannot accompany event, event-order, error or denial expectations.\", locationOf(body.noEventsLine));\n }\n validateQueryRejection(context, line, body);\n const { whenDeclared: _, noEventsLine: _noEventsLine, ...members } = body;\n const specification: SpecificationSyntax = { kind: 'SpecificationSyntax', sourceOptions: context.sourceOptions, name, description, ...members,\n ...(parameters.length === 0 ? {} : { parameters }), ...(cases.length === 0 ? {} : { cases }), location: locationOf(line) };\n validateTable(specification, context);\n return specification;\n}\n\nfunction validateQueryRejection(context: ParserContext, line: SourceLine, body: SpecificationBody): void {\n if (!isQueryRejectionCandidate(body) || isWellFormedQueryRejection(body)) return;\n context.error(DiagnosticCodes.MismatchedSpecificationQueryResult,\n \"A query rejection requires exactly one query and one 'then error', no action, and no other outcomes\", locationOf(line));\n}\n\nfunction isQueryRejectionCandidate(body: SpecificationBody): boolean {\n return body.thenErrors.length > 0 && queriedCallCount(body) > 0 && (body.whenQuery !== null || !hasAction(body));\n}\n\nfunction isWellFormedQueryRejection(body: SpecificationBody): boolean {\n return !hasAction(body) && hasOneQueryAndOneError(body) && !hasOtherOutcome(body);\n}\n\nfunction hasOneQueryAndOneError(body: SpecificationBody): boolean {\n return queriedCallCount(body) === 1 && body.thenErrors.length === 1;\n}\n\nfunction hasAction(body: SpecificationBody): boolean {\n return [body.when, body.whenAppended, body.whenClock, body.whenTrigger, body.whenCapture, body.whenRedelivered].some(action => action !== null);\n}\n\nfunction queriedCallCount(body: SpecificationBody): number {\n return body.thenQueries.length + (body.whenQuery === null ? 0 : 1);\n}\n\nfunction hasOtherOutcome(body: SpecificationBody): boolean {\n return [\n body.thenResults.length > 0,\n body.thenNoResult !== null,\n body.thenDenied !== null,\n body.thenEvents.length > 0,\n body.thenNoEvents,\n body.thenEventsInAnyOrder,\n body.thenReadModels.length > 0,\n body.thenAbsentReadModels.length > 0,\n body.thenReturns !== null,\n body.thenQueries.some(query => query.results.length > 0)\n ].some(outcome => outcome);\n}\n\nfunction parseOperationStep(context: ParserContext, line: SourceLine, body: SpecificationBody): boolean {\n if (!operationStepPrefix.test(line.content)) return false;\n const match = operationStep.exec(line.content);\n if (match === null || (match[1] === 'given operation') !== (match[3] !== undefined)) {\n context.error(DiagnosticCodes.InvalidOperationSpecification, \"Expected 'given operation <Name> fails', 'then operation <Name>' or 'then compensated <Name>'.\", locationOf(line));\n skipBody(context, line.indent);\n } else if (match[1] === 'then operation') {\n const values: PropertyMappingSyntax[] = [];\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n const value = parseConcreteMapping(context, child, mappingPattern, DiagnosticCodes.InvalidOperationSpecification);\n if (value !== null) values.push(value);\n }\n body.thenOperations.push({ kind: 'SpecificationOperationSyntax', operation: match[2], values, location: locationOf(line) });\n } else {\n rejectOperationChildren(context, line, DiagnosticCodes.InvalidOperationSpecification, 'Failure and compensation assertions cannot have children.');\n if (match[1] === 'given operation') body.givenOperationFailures.push({ kind: 'SpecificationOperationFailureSyntax', operation: match[2], location: locationOf(line) });\n else body.thenCompensated.push({ kind: 'SpecificationCompensatedSyntax', operation: match[2], location: locationOf(line) });\n }\n return true;\n}\n\nfunction parseGiven(context: ParserContext, line: SourceLine, body: SpecificationBody): void {\n if (givenClockPrefix.test(line.content)) {\n if (body.givenClock !== null) {\n context.error(DiagnosticCodes.InvalidSpecificationClock, 'A specification states its clock at most once.', locationOf(line));\n skipBody(context, line.indent);\n } else {\n body.givenClock = parseClock(context, line, 'given');\n }\n } else if (givenTimeZonePrefix.test(line.content)) {\n const match = givenTimeZonePattern.exec(line.content);\n skipBody(context, line.indent);\n if (body.givenTimeZone !== null || match === null) {\n context.error(DiagnosticCodes.InvalidSpecificationTimeZone, \"A specification states its time zone at most once, as 'given time zone \\\"<id>\\\"'.\", locationOf(line));\n } else {\n body.givenTimeZone = { kind: 'SpecificationTimeZoneSyntax', id: unescapeString(match[1]), location: locationOf(line) };\n }\n } else if (givenGeneratedPrefix.test(line.content)) {\n const pinned = parseGivenGenerated(context, line);\n if (pinned !== null) {\n (body.givenGenerated ??= []).push(pinned);\n }\n } else if (givenCapturePrefix.test(line.content)) {\n const capture = parseCapture(context, line, 'given');\n if (capture !== null) {\n body.givenCaptures.push(capture);\n }\n } else if (line.content.startsWith('given caller')) {\n if (body.givenCaller !== null || body.givenCallerPersona !== undefined) {\n context.error(DiagnosticCodes.DuplicateSpecificationCallerOrDenied, \"A specification has at most one 'given caller' block.\", locationOf(line));\n context.skipBlock(line.indent);\n } else if (line.content.startsWith('given caller as')) {\n const match = callerPersonaPattern.exec(line.content);\n if (match === null) context.error(DiagnosticCodes.InvalidSpecificationCallerPersona, \"Expected 'given caller as <Persona>'.\", locationOf(line));\n const child = context.peekChild(line.indent);\n if (child !== undefined) context.error(DiagnosticCodes.InvalidSpecificationCallerPersona, \"'given caller as <Persona>' has no body; use an explicit 'given caller' for refinements.\", locationOf(child));\n skipBody(context, line.indent);\n if (match !== null) body.givenCallerPersona = { kind: 'SpecificationCallerPersonaSyntax', name: match[1], location: locationOf(line) };\n } else {\n body.givenCaller = parseCaller(context, line);\n }\n } else if (readModelPrefix.test(line.content)) {\n const readModel = parseReadModelStep(context, line, givenReadModelPattern, 'given');\n if (readModel !== undefined) {\n body.givenReadModels.push(readModel);\n }\n } else {\n const event = parseEventStep(context, line, givenPattern, 'given');\n if (event !== undefined) {\n body.given.push(event);\n }\n }\n}\n\nconst callerRolePattern = pattern(`^role${dotNetWhitespace}+\"(${stringBodyPattern})\"$`);\nconst callerClaimPattern = pattern(`^claim${dotNetWhitespace}+\"(${stringBodyPattern})\"${dotNetWhitespace}*=${dotNetWhitespace}*\"(${stringBodyPattern})\"$`);\n\n// 'given caller' and the authenticated, role and claim lines under it.\nfunction parseCaller(context: ParserContext, line: SourceLine): SpecificationCallerSyntax | null {\n if (line.content !== 'given caller') {\n context.error(DiagnosticCodes.InvalidSpecificationCaller, \"Expected exactly 'given caller'.\", locationOf(line));\n context.skipBlock(line.indent);\n return null;\n }\n let authenticated = false;\n const roles: string[] = [];\n const claims: SpecificationCallerClaimSyntax[] = [];\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n const role = callerRolePattern.exec(child.content);\n const claim = callerClaimPattern.exec(child.content);\n if (child.content === 'authenticated' && !authenticated) {\n authenticated = true;\n } else if (role !== null) {\n roles.push(unescapeString(role[1]));\n } else if (claim !== null) {\n claims.push({ kind: 'SpecificationCallerClaimSyntax', type: unescapeString(claim[1]), value: unescapeString(claim[2]), location: locationOf(child) });\n } else {\n context.error(containsCaseReference(child.content) ? DiagnosticCodes.InvalidSpecificationCaseReference : DiagnosticCodes.InvalidSpecificationCaller, `Invalid caller fixture '${child.content}' - expected authenticated, role \"...\", or claim \"...\" = \"...\".`, locationOf(child));\n }\n }\n return { kind: 'SpecificationCallerSyntax', authenticated, roles, claims, location: locationOf(line) };\n}\n\nfunction parseWhen(context: ParserContext, line: SourceLine, body: SpecificationBody, name: string): void {\n const appends = line.content.startsWith('when append');\n if (body.whenDeclared) {\n const code = body.whenAppended !== null || appends ? DiagnosticCodes.ConflictingSpecificationActions : DiagnosticCodes.DuplicateSpecificationWhen;\n context.error(code, `Specification '${name}' already declares a 'when' - a specification can have at most one`, locationOf(line));\n skipBody(context, line.indent);\n return;\n }\n body.whenDeclared = true;\n if (appends) {\n body.whenAppended = parseEventStep(context, line, whenAppendPattern, 'when append') ?? null;\n return;\n }\n if (whenRedeliveredPrefix.test(line.content)) {\n const match = whenRedeliveredPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.UnmatchedRedeliveredOccurrence, \"Expected 'when redelivered <Event> to <Reaction>'.\", locationOf(line));\n skipBody(context, line.indent);\n } else {\n body.whenRedelivered = { kind: 'SpecificationRedeliverySyntax', eventType: match[1], reaction: match[2], ...parseValuesWithEventSource(context, line, undefined, undefined, 'when redelivered'), location: locationOf(line) };\n }\n return;\n }\n if (whenClockPrefix.test(line.content)) {\n body.whenClock = parseClock(context, line, 'when');\n return;\n }\n if (whenTriggerPrefix.test(line.content)) {\n body.whenTrigger = parseNamedStep(context, line, whenTriggerPattern, DiagnosticCodes.InvalidSpecificationTrigger, 'when trigger', 'when trigger <Trigger>',\n (trigger, values) => ({ kind: 'SpecificationTriggerSyntax', trigger, values, location: locationOf(line) }));\n return;\n }\n if (whenCapturePrefix.test(line.content)) {\n body.whenCapture = parseCapture(context, line, 'when');\n return;\n }\n if (whenQueryPrefix.test(line.content)) {\n body.whenQuery = parseNamedStep(context, line, whenQueryPattern, DiagnosticCodes.InvalidSpecificationQueryAction, 'when query', 'when query <Query>',\n (query, values) => ({ kind: 'SpecificationWhenQuerySyntax', query, arguments: values, location: locationOf(line) }), true);\n return;\n }\n const match = whenPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidSpecificationWhen, `Invalid 'when' declaration '${line.content}' - expected 'when <CommandType>' or 'when append <EventType>'`, locationOf(line));\n skipBody(context, line.indent);\n return;\n }\n const generatedValues: PropertyMappingSyntax[] = [];\n const values = parseValuesWithEventSource(context, line, generatedValues, match);\n body.when = { kind: 'SpecificationCommandSyntax', commandType: match[1], ...values, generatedValues, inlineProperty: match.groups?.property ?? null, location: locationOf(line) };\n}\n\nfunction parseThen(context: ParserContext, line: SourceLine, body: SpecificationBody): void {\n if (noEventsPrefix.test(line.content)) {\n if (line.content !== 'then no events' || body.thenNoEvents) {\n context.error(DiagnosticCodes.InvalidNoEventsExpectation, \"Expected one 'then no events' directive.\", locationOf(line));\n } else {\n body.thenNoEvents = true;\n body.noEventsLine = line;\n }\n const child = context.peekChild(line.indent);\n if (child !== undefined) context.error(DiagnosticCodes.InvalidNoEventsExpectation, \"'then no events' cannot have child mappings.\", locationOf(child));\n skipBody(context, line.indent);\n return;\n }\n if (thenReturnsPrefix.test(line.content)) {\n const expectation = parseReturn(context, line);\n if (body.thenReturns !== null) {\n context.error(DiagnosticCodes.InvalidReturnExpectation, 'A specification declares at most one return expectation.', locationOf(line));\n } else {\n body.thenReturns = expectation;\n }\n return;\n }\n if (line.content.startsWith('then events')) {\n if (line.content !== 'then events in any order' || body.thenEventsInAnyOrder) {\n context.error(DiagnosticCodes.InvalidSpecificationEventOrder, 'Expected one \\'then events in any order\\' directive.', locationOf(line));\n } else {\n body.thenEventsInAnyOrder = true;\n }\n skipBody(context, line.indent);\n return;\n }\n if (thenResultPrefix.test(line.content)) {\n parseResult(context, line, body);\n return;\n }\n if (noResultPrefix.test(line.content)) {\n if (line.content !== 'then no result' || body.thenNoResult !== null) {\n context.error(DiagnosticCodes.InvalidSpecificationQueryAction, 'Expected one \\'then no result\\' directive.', locationOf(line));\n } else {\n body.thenNoResult = { kind: 'SpecificationNoResultSyntax', location: locationOf(line) };\n }\n skipBody(context, line.indent);\n return;\n }\n if (line.content.startsWith('then denied')) {\n if (line.content !== 'then denied') {\n context.error(DiagnosticCodes.InvalidSpecificationDenied, 'Expected exactly \\'then denied\\'.', locationOf(line));\n skipBody(context, line.indent);\n } else if (body.thenDenied !== null) {\n context.error(DiagnosticCodes.DuplicateSpecificationCallerOrDenied, \"A specification has at most one 'then denied' outcome.\", locationOf(line));\n } else {\n body.thenDenied = { kind: 'SpecificationDeniedSyntax', location: locationOf(line) };\n }\n return;\n }\n if (line.content === 'then error') {\n body.thenErrors.push({ kind: 'SpecificationErrorSyntax', name: null, location: locationOf(line) });\n return;\n }\n if (line.content.startsWith('then error case.')) {\n const caseValue = parseMappingSource(line.content.substring(11), { ...locationOf(line), column: locationOf(line).column + 11 }, context);\n if (caseValue.kind === 'CaseValueExpressionSyntax') body.thenErrors.push({ kind: 'SpecificationErrorSyntax', name: null, caseValue, location: locationOf(line) });\n return;\n }\n const error = thenErrorPattern.exec(line.content);\n if (error !== null) {\n body.thenErrors.push({ kind: 'SpecificationErrorSyntax', name: unescapeString(error[1]), location: locationOf(line) });\n return;\n }\n if (firstWord(line.content.substring('then'.length).trim()) === 'error') {\n context.error(DiagnosticCodes.InvalidThenError, `Invalid 'then error' declaration '${line.content}' - expected 'then error' or 'then error \"<reason>\"'`, locationOf(line));\n skipBody(context, line.indent);\n return;\n }\n if (thenNoPrefix.test(line.content)) {\n // Legacy documents keep skipping these assertions silently; Exact mirrors the native diagnostics.\n if (context.sourceOptions.numericMode === 'exact') {\n const absent = parseAbsentReadModel(context, line);\n if (absent !== null) body.thenAbsentReadModels.push(absent);\n return;\n }\n const match = thenAbsentReadModelPattern.exec(line.content);\n if (match !== null && !match[2].endsWith(' exactly')) {\n const key = parseMappingSource(match[2].trim(), locationOf(line), context.valueContext);\n if (key.kind === 'LiteralExpressionSyntax' || key.kind === 'ObjectExpressionSyntax' || key.kind === 'CaseValueExpressionSyntax') body.thenAbsentReadModels.push({ kind: 'SpecificationAbsentReadModelSyntax', name: match[1], key, location: locationOf(line) });\n }\n context.skipOpaqueBlock(line.indent);\n return;\n }\n if (thenQueryPrefix.test(line.content)) {\n // Legacy documents keep skipping malformed query bodies silently; Exact reports what the native parser reports.\n const exact = context.sourceOptions.numericMode === 'exact';\n const reject = (code: string, message: string, at: SourceLine): void => {\n if (!exact) return context.skipOpaqueBlock(at.indent);\n context.error(code, message, locationOf(at));\n context.skipBlock(at.indent);\n };\n const match = thenQueryPattern.exec(line.content);\n if (match === null) return reject(DiagnosticCodes.InvalidSpecificationQuery, `Invalid 'then query' declaration '${line.content}' - expected 'then query <Query> [exactly]'`, line);\n const args: PropertyMappingSyntax[] = [];\n const results: SpecificationQueryResultSyntax[] = [];\n let hasArguments = false;\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n if (child.content === 'arguments' && !hasArguments) args.push(...parseValues(context.valueContext, child, true, undefined, context));\n else if (child.content === 'arguments') reject(DiagnosticCodes.DuplicateSpecificationQueryArguments, `Query assertion '${match[1]}' already declares arguments`, child);\n else if (child.content === 'result') results.push({ kind: 'SpecificationQueryResultSyntax', properties: parseValues(context.valueContext, child, true), exactly: false, location: locationOf(child) });\n else reject(DiagnosticCodes.UnknownSpecificationQueryDirective, `Unexpected '${firstWord(child.content)}' in 'then query' body - expected arguments or result`, child);\n hasArguments ||= child.content === 'arguments';\n }\n body.thenQueries.push({ kind: 'SpecificationQuerySyntax', query: match[1], arguments: args, results, exactly: match[2] !== undefined, location: locationOf(line) });\n return;\n }\n if (readModelPrefix.test(line.content)) {\n const readModel = parseReadModelStep(context, line, thenReadModelPattern, 'then');\n if (readModel !== undefined) {\n body.thenReadModels.push(readModel);\n }\n return;\n }\n const event = parseEventStep(context, line, thenEventPattern, 'then');\n if (event !== undefined) {\n body.thenEvents.push(event);\n }\n}\n\n// The Exact port of C# ParseAbsentReadModel: every malformed part is reported rather than dropped.\nfunction parseAbsentReadModel(context: ParserContext, line: SourceLine): SpecificationAbsentReadModelSyntax | null {\n const match = thenAbsentReadModelPattern.exec(line.content);\n if (match === null || match[2].endsWith(' exactly')) {\n context.error(DiagnosticCodes.InvalidAbsentReadModelStep, `Invalid absence assertion '${line.content}' - expected 'then no readmodel <ReadModelType> for <key>'`, locationOf(line));\n skipBody(context, line.indent);\n return null;\n }\n const keyText = match[2].trim();\n const validString = !(keyText.startsWith('\"') || keyText.startsWith(\"'\")) || absentKeyStringPattern.test(keyText);\n const key = validString ? parseMappingSource(keyText, locationOf(line), context.valueContext) : null;\n const concrete = key !== null && (key.kind === 'LiteralExpressionSyntax' || key.kind === 'ObjectExpressionSyntax' || key.kind === 'CaseValueExpressionSyntax');\n if (!concrete) context.error(DiagnosticCodes.InvalidAbsentReadModelStep, `Invalid absence key '${keyText}' - expected exactly one concrete value.`, locationOf(line));\n let hasChildren = false;\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n context.error(DiagnosticCodes.InvalidAbsentReadModelStep, 'An absent read model assertion cannot have child mappings.', locationOf(child));\n hasChildren = true;\n }\n return hasChildren || !concrete ? null : { kind: 'SpecificationAbsentReadModelSyntax', name: match[1], key, location: locationOf(line) } as SpecificationAbsentReadModelSyntax;\n}\n\nfunction skipBody(context: ParserContext, indent: number): void {\n if (context.sourceOptions.numericMode !== 'exact') return context.skipBlock(indent);\n context.skipOpaqueBlock(indent);\n}\n\nfunction parseClock(context: ParserContext, line: SourceLine, keyword: string): SpecificationClockSyntax | null {\n const match = clockPattern.exec(line.content);\n skipBody(context, line.indent);\n if (match === null || match[1] !== keyword) {\n context.error(containsCaseReference(line.content) ? DiagnosticCodes.InvalidSpecificationCaseReference : DiagnosticCodes.InvalidSpecificationClock,\n `Invalid '${keyword} clock' - expected '${keyword} clock \"<ISO 8601 instant>\"', such as '${keyword} clock \"2026-10-05T08:00:00Z\"'`, locationOf(line));\n return null;\n }\n return { kind: 'SpecificationClockSyntax', instant: match[2], location: locationOf(line) };\n}\n\nfunction parseGivenGenerated(context: ParserContext, line: SourceLine): SpecificationGeneratedValueSyntax | null {\n const match = givenGeneratedPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidGeneratedFixture, \"Expected 'given generated <Command>.<property> = <value>' with exactly one concrete value.\", locationOf(line));\n context.skipBlock(line.indent);\n return null;\n }\n const location = locationOf(line);\n const source = parseConcrete(context, match[3], { ...location, column: location.column + line.content.indexOf(match[3], line.content.indexOf('=') + 1) }, DiagnosticCodes.InvalidGeneratedFixture);\n const child = context.peekChild(line.indent);\n if (child !== undefined) {\n context.error(DiagnosticCodes.InvalidGeneratedFixture, 'A pinned generated value cannot have child directives.', locationOf(child));\n context.skipBlock(line.indent);\n }\n return source === null ? null : { kind: 'SpecificationGeneratedValueSyntax', command: match[1], property: match[2], source, location };\n}\n\nfunction parseCapture(context: ParserContext, line: SourceLine, keyword: string): SpecificationCaptureSyntax | null {\n return parseNamedStep(context, line, capturePattern, DiagnosticCodes.InvalidSpecificationCapture, `${keyword} capture`, `${keyword} capture <Capture>`,\n (capture, record) => ({ kind: 'SpecificationCaptureSyntax', capture, record, location: locationOf(line) }));\n}\n\n// A step naming one thing on its header line, with '<field> = <value>' lines beneath it.\nfunction parseNamedStep<T>(\n context: ParserContext, line: SourceLine, regex: RegExp, code: string, keyword: string, expected: string,\n create: (name: string, values: PropertyMappingSyntax[]) => T, queryArguments = false): T | null {\n const match = regex.exec(line.content);\n if (match === null) {\n context.error(code, `Invalid '${keyword}' declaration '${line.content}' - expected '${expected}'`, locationOf(line));\n skipBody(context, line.indent);\n return null;\n }\n return create(match[1], parseValues(context, line, false, undefined, queryArguments ? context : undefined));\n}\n\nfunction parseResult(context: ParserContext, line: SourceLine, body: SpecificationBody): void {\n const match = thenResultPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidSpecificationQueryAction, `Invalid 'then result' declaration '${line.content}' - expected 'then result [exactly]'`, locationOf(line));\n skipBody(context, line.indent);\n return;\n }\n body.thenResults.push({ kind: 'SpecificationQueryResultSyntax', properties: parseValues(context, line), exactly: match[1] !== undefined, location: locationOf(line) });\n}\n\nfunction parseReadModelStep(context: ParserContext, line: SourceLine, regex: RegExp, keyword: string): SpecificationReadModelSyntax | undefined {\n const match = regex.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidReadModelStep, `Invalid '${keyword} readmodel' declaration '${line.content}' - expected '${keyword} readmodel <ReadModelType>'`, locationOf(line));\n skipBody(context, line.indent);\n return undefined;\n }\n return {\n kind: 'SpecificationReadModelSyntax',\n name: match[1],\n properties: parseValues(context, line, false, match),\n exactly: keyword === 'then' && match.groups?.exactly !== undefined,\n inlineProperty: match.groups?.property ?? null,\n location: locationOf(line),\n };\n}\n\nfunction parseEventStep(context: ParserContext, line: SourceLine, regex: RegExp, keyword: string): SpecificationEventSyntax | undefined {\n const match = regex.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidEventStep, `Invalid '${keyword}' declaration '${line.content}' - expected '${keyword} <EventType>'`, locationOf(line));\n skipBody(context, line.indent);\n return undefined;\n }\n return { kind: 'SpecificationEventSyntax', eventType: match[1], ...parseValuesWithEventSource(context, line, undefined, match, keyword), inlineProperty: match.groups?.property ?? null, location: locationOf(line) };\n}\n\nexport const specificationStream = sourceStreamPattern('^stream\\\\s+([A-Za-z_]\\\\w*)\\\\.([A-Za-z_]\\\\w*)$');\nconst specificationStreamId = pattern('^streamId\\\\s*=(?!=|>)\\\\s*(.+)$');\n\nfunction parseValuesWithEventSource(context: ParserContext, parent: SourceLine, generated?: PropertyMappingSyntax[], inline?: RegExpExecArray, eventKeyword?: string): { values: PropertyMappingSyntax[]; for: ExpressionSyntax | null; stream?: SpecificationStreamSyntax; noStream?: SpecificationNoStreamSyntax } {\n const values: PropertyMappingSyntax[] = [];\n addInlineValue(context, parent, inline, values);\n let eventSource: ExpressionSyntax | null = null;\n let stream: SpecificationStreamSyntax | undefined;\n let noStream: SpecificationNoStreamSyntax | undefined;\n let hasRoute = false;\n for (let child = context.peekChild(parent.indent); child !== undefined; child = context.peekChild(parent.indent)) {\n context.reader.takeSignificant();\n if (generated !== undefined && generatedFixturePrefix.test(child.content)) {\n const fixture = parseConcreteMapping(context, child, generatedFixturePattern, DiagnosticCodes.InvalidGeneratedFixture);\n if (fixture !== null) generated.push(fixture);\n continue;\n }\n const mapping = mappingPattern.exec(child.content);\n if (mapping !== null) {\n addFixtureValue(context, values, mappingOf(context, child, mapping));\n } else if (firstWord(child.content) === 'stream' || child.content.startsWith('no stream')) {\n if (eventKeyword === undefined) {\n context.error(DiagnosticCodes.SpecificationStreamOnCommand, 'A command occurrence cannot declare a route; assert it on a then event.', locationOf(child));\n context.skipBlock(child.indent);\n continue;\n }\n if (hasRoute) {\n context.error(DiagnosticCodes.InvalidSpecificationStream, 'An event occurrence declares at most one stream or no stream directive.', locationOf(child));\n context.skipBlock(child.indent);\n continue;\n }\n const route = specificationStream.exec(child.content);\n if (child.content === 'no stream' && (eventKeyword === 'then' || eventKeyword === 'when redelivered')) {\n noStream = { kind: 'SpecificationNoStreamSyntax', location: locationOf(child) };\n hasRoute = true;\n rejectSpecificationRouteChildren(context, child);\n } else if (route !== null) {\n stream = parseSpecificationStream(context, child, route);\n hasRoute = true;\n } else {\n context.error(DiagnosticCodes.InvalidSpecificationStream, \"Expected 'stream Source.Stream', or 'no stream' on a then event.\", locationOf(child));\n context.skipBlock(child.indent);\n }\n } else if (firstWord(child.content) === 'for') {\n const source = child.content.substring('for'.length).trim();\n if (source.length === 0) {\n context.error(DiagnosticCodes.InvalidSpecificationEventSource, 'Invalid event-source assertion \\'for\\' - expected \\'for <value>\\'', locationOf(child));\n } else if (eventSource !== null) {\n context.error(DiagnosticCodes.DuplicateSpecificationEventSource, 'A specification step can declare its event-source assertion only once', locationOf(child));\n } else {\n eventSource = parseMappingSource(source, locationOf(child), context);\n }\n } else {\n context.error(DiagnosticCodes.InvalidSpecificationValue, `Invalid property mapping '${child.content}' - expected '<property> = <value>'`, locationOf(child), diagnosticText('text', child.content));\n }\n }\n return { values, for: eventSource, ...(stream === undefined ? {} : { stream }), ...(noStream === undefined ? {} : { noStream }) };\n}\n\nexport function parseSpecificationStream(context: ParserContext, header: SourceLine, route: RegExpExecArray): SpecificationStreamSyntax {\n let streamId: PropertyMappingSyntax | null = null;\n let streamIdParts: PropertyMappingSyntax[] = [];\n let block = false;\n const directiveLocations: Record<string, ReturnType<typeof locationOf>> = {};\n for (let child = context.peekChild(header.indent); child !== undefined; child = context.peekChild(header.indent)) {\n context.reader.takeSignificant();\n if (child.content === 'streamId') {\n if (streamId !== null || block) {\n context.error(DiagnosticCodes.InvalidSpecificationStream, \"Declare either one 'streamId = <literal>' mapping or one streamId part block.\", locationOf(child));\n context.skipBlock(child.indent);\n } else {\n block = true;\n directiveLocations.streamId = locationOf(child);\n streamIdParts = parseRouteParts(context, child, DiagnosticCodes.InvalidSpecificationStream).map(part => part.source.kind === 'PathExpressionSyntax' && part.source.path.startsWith('case.')\n ? { ...part, source: parseMappingSource(part.source.path, part.source.location, context) } : part);\n }\n continue;\n }\n const mapping = specificationStreamId.exec(child.content);\n if (mapping === null || streamId !== null || block) {\n context.error(DiagnosticCodes.InvalidSpecificationStream, \"Declare either one 'streamId = <literal>' mapping or one streamId part block.\", locationOf(child));\n context.skipBlock(child.indent);\n continue;\n }\n const location = { ...locationOf(child), column: child.indent + 1 + child.content.indexOf(mapping[1], child.content.indexOf('=') + 1) };\n streamId = { kind: 'PropertyMappingSyntax', property: 'streamId', source: parseMappingSource(mapping[1], location, context), location: locationOf(child) };\n rejectSpecificationRouteChildren(context, child);\n }\n return { kind: 'SpecificationStreamSyntax', eventSource: route[1], stream: route[2], streamId, streamIdParts, directiveLocations,\n referenceLocation: { ...locationOf(header), column: header.indent + 1 + header.content.indexOf(route[1], 'stream'.length) },\n referenceLength: route[1].length + 1 + route[2].length, location: locationOf(header) };\n}\n\nexport function rejectSpecificationRouteChildren(context: ParserContext, line: SourceLine): void {\n const child = context.peekChild(line.indent);\n if (child !== undefined) {\n context.error(DiagnosticCodes.InvalidSpecificationStream, 'This directive cannot have children.', locationOf(child));\n context.skipBlock(line.indent);\n }\n}\n\nfunction parseValues(context: ParserContext, parent: SourceLine, nativeIdentifiers = false, inline?: RegExpExecArray, queryArgumentsContext?: ParserContext): PropertyMappingSyntax[] {\n const values: PropertyMappingSyntax[] = [];\n addInlineValue(context, parent, inline, values);\n for (let child = context.peekChild(parent.indent); child !== undefined; child = context.peekChild(parent.indent)) {\n context.reader.takeSignificant();\n const mapping = (nativeIdentifiers || context.sourceOptions.numericMode === 'exact' ? nativeMappingPattern : mappingPattern).exec(child.content);\n if (mapping === null) {\n context.error(DiagnosticCodes.InvalidSpecificationValue, `Invalid property mapping '${child.content}' - expected '<property> = <value>'`, locationOf(child), diagnosticText('text', child.content));\n continue;\n }\n const value = mappingOf(context, child, mapping, nativeIdentifiers);\n if (queryArgumentsContext !== undefined) {\n if (values.some(existing => existing.property === value.property)) {\n queryArgumentsContext.error(DiagnosticCodes.UnknownSpecificationQueryArgument, `Query argument '${value.property}' is repeated.`, value.location, diagnosticText('argument', value.property));\n }\n values.push(value);\n } else {\n addFixtureValue(context, values, value);\n }\n }\n return values;\n}\n\nfunction mappingOf(context: ParserContext, line: SourceLine, match: RegExpExecArray, nativeIdentifiers = false): PropertyMappingSyntax {\n return { kind: 'PropertyMappingSyntax', property: match[1], source: parseMappingSource(match[2], loc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3,"file":"SpecificationParser.js","names":["parseMappingSource","operationStepPrefix","pattern","operationStep","header","callerPersonaPattern","nativePattern","prefix","exactly","dotNetWhitespace","givenPattern","whenAppendPattern","whenPattern","thenEventPattern","thenQueryPrefix","readModelPrefix","givenReadModelPattern","thenReadModelPattern","thenNoPrefix","thenErrorPattern","stringBodyPattern","mappingPattern","nativeMappingPattern","givenTimeZonePrefix","givenTimeZonePattern","givenClockPrefix","givenCapturePrefix","thenInvokesPrefix","thenInvokesPattern","givenGeneratedPrefix","givenGeneratedPattern","whenClockPrefix","whenTriggerPrefix","whenCapturePrefix","whenQueryPrefix","thenResultPrefix","noResultPrefix","whenRedeliveredPrefix","whenRedeliveredPattern","noEventsPrefix","clockPattern","whenTriggerPattern","capturePattern","whenQueryPattern","thenResultPattern","thenAbsentReadModelPattern","absentKeyStringPattern","thenQueryPattern","name","line","context","DiagnosticCodes","locationOf","description","parameters","cases","body","child","isFileDirective","keyword","firstWord","parameter","parseParameter","row","parseCase","parseDescription","_","_noEventsLine","members","specification","validateTable","action","query","outcome","match","values","value","parseConcreteMapping","rejectOperationChildren","unescapeString","pinned","capture","readModel","event","callerRolePattern","callerClaimPattern","authenticated","roles","claims","role","claim","containsCaseReference","appends","code","generatedValues","thenReturnsPrefix","expectation","parseReturn","invocation","caseValue","parseSpecificationValue","error","absent","key","exact","at","message","args","results","hasArguments","keyText","concrete","hasChildren","indent","location","source","parseConcrete","regex","expected","create","queryArguments","specificationStream","sourceStreamPattern","specificationStreamId","addInlineValue","parent","inline","eventSource","stream","noStream","hasRoute","generated","generatedFixturePrefix","fixture","generatedFixturePattern","mapping","addFixtureValue","eventKeyword","route","diagnosticText","streamId","streamIdParts","block","directiveLocations","parseRouteParts","part","nativeIdentifiers","queryArgumentsContext","existing"],"sources":["../../../../../../Compiler/Parsing/SpecificationParser.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { parseRouteParts } from './EventSourceParser';\nimport { diagnosticText } from '../Diagnostics/DiagnosticArgument';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { ExpressionSyntax, PropertyMappingSyntax } from '../Syntax/Expressions';\nimport {\n SpecificationCaptureSyntax, SpecificationClockSyntax, SpecificationTimeZoneSyntax, SpecificationGeneratedValueSyntax, SpecificationCommandSyntax, SpecificationErrorSyntax, SpecificationEventSyntax, SpecificationStreamSyntax, SpecificationNoStreamSyntax,\n SpecificationNoResultSyntax, SpecificationQueryResultSyntax, SpecificationReadModelSyntax, SpecificationSyntax, SpecificationTriggerSyntax,\n SpecificationWhenQuerySyntax, SpecificationCallerPersonaSyntax, SpecificationOperationFailureSyntax, SpecificationOperationSyntax, SpecificationCompensatedSyntax, SpecificationRedeliverySyntax,\n} from '../Syntax/Specifications';\nimport { SpecificationDeniedSyntax, SpecificationReturnSyntax } from '../Syntax/Responses';\nimport { dotNetWhitespace, nativePattern, pattern } from '../Text/patterns';\nimport { sourceStreamPattern } from '../Text/SourceStreamNames';\nimport { stringBodyPattern, unescapeString } from '../Text/StringLiteral';\nimport { containsCaseReference, parseCase, parseParameter, parseSpecificationValue as parseMappingSource, validateTable } from './SpecificationCaseParser';\nimport { parseDescription } from './DescriptionParser';\nimport { isFileDirective } from './FileReferences';\nimport { firstWord } from './LineText';\nimport { ParserContext } from './ParserContext';\nimport { addFixtureValue, addInlineValue } from './SpecificationExampleParser';\nimport { rejectOperationChildren } from './OperationParser';\nimport { generatedFixturePattern, generatedFixturePrefix, parseConcrete, parseConcreteMapping, parseReturn, thenReturnsPrefix } from './SpecificationResponseParser';\nimport { locationOf, SourceLine } from './SourceLine';\nimport { SpecificationAbsentReadModelSyntax, SpecificationCallerClaimSyntax, SpecificationCallerSyntax, SpecificationInvocationSyntax, SpecificationQuerySyntax } from '../Syntax/Specifications';\n\nconst operationStepPrefix = pattern('^(?:given\\\\s+operation|then\\\\s+(?:operation|compensated))(?:\\\\s|$)');\nconst operationStep = pattern('^(given operation|then operation|then compensated)\\\\s+([A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)*)(\\\\s+fails)?$');\nconst header = pattern('^specification\\\\s+([A-Za-z_]\\\\w*)$');\nconst callerPersonaPattern = pattern('^given caller as ([A-Za-z_]\\\\w*)$');\nconst stepName = '([A-Z]\\\\w*(?:\\\\.\\\\w+)*)';\nconst inlineAssignment = '(?:\\\\s+(?<property>[\\\\w.]+)\\\\s*=(?!=|>)\\\\s*(?<value>.+))?';\nconst stepPattern = (prefix: string, exactly = ''): RegExp => nativePattern(`^${prefix}\\\\s+${stepName}${exactly}${inlineAssignment}$`.replaceAll('\\\\s', dotNetWhitespace));\nconst givenPattern = stepPattern('given');\nconst whenAppendPattern = stepPattern('when\\\\s+append');\nconst whenPattern = stepPattern('when');\nconst thenEventPattern = stepPattern('then');\nconst thenQueryPrefix = pattern('^then\\\\s+query\\\\b');\nconst readModelPrefix = pattern('^(?:given|then)\\\\s+readmodel\\\\b');\nconst givenReadModelPattern = stepPattern('given\\\\s+readmodel');\nconst thenReadModelPattern = stepPattern('then\\\\s+readmodel', '(?<exactly>\\\\s+exactly)?');\nconst thenNoPrefix = pattern('^then\\\\s+no\\\\b');\nconst thenErrorPattern = pattern(`^then\\\\s+error\\\\s+\"(${stringBodyPattern})\"$`);\nconst mappingPattern = pattern('^([\\\\w.]+)\\\\s*=(?!=|>)\\\\s*(.+)$');\nconst nativeMappingPattern = nativePattern('^([\\\\w.]+)\\\\s*=(?!=|>)\\\\s*(.+)$');\nconst givenTimeZonePrefix = pattern('^given\\\\s+time\\\\s+zone\\\\b');\nconst givenTimeZonePattern = pattern(`^given\\\\s+time\\\\s+zone\\\\s+\"(${stringBodyPattern})\"$`);\nconst givenClockPrefix = pattern('^given\\\\s+clock\\\\b');\nconst givenCapturePrefix = pattern('^given\\\\s+capture\\\\b');\nconst thenInvokesPrefix = pattern('^then\\\\s+invokes\\\\b');\nconst thenInvokesPattern = pattern('^then\\\\s+invokes\\\\s+([A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)*)$');\nconst givenGeneratedPrefix = pattern('^given\\\\s+generated\\\\b');\nconst givenGeneratedPattern = pattern('^given\\\\s+generated\\\\s+([A-Z]\\\\w*)\\\\.([a-z_]\\\\w*)\\\\s*=(?!=|>)\\\\s*(.+)$');\nconst whenClockPrefix = pattern('^when\\\\s+clock\\\\b');\nconst whenTriggerPrefix = pattern('^when\\\\s+trigger\\\\b');\nconst whenCapturePrefix = pattern('^when\\\\s+capture\\\\b');\nconst whenQueryPrefix = pattern('^when\\\\s+query\\\\b');\nconst thenResultPrefix = pattern('^then\\\\s+result\\\\b');\nconst noResultPrefix = pattern('^then\\\\s+no\\\\s+result\\\\b');\nconst whenRedeliveredPrefix = nativePattern('^when\\\\s+redelivered\\\\b');\nconst whenRedeliveredPattern = nativePattern('^when\\\\s+redelivered\\\\s+([A-Za-z_]\\\\w*(?:\\\\.\\\\w+)*)\\\\s+to\\\\s+([A-Za-z_]\\\\w*(?:\\\\.\\\\w+)*)$');\nconst noEventsPrefix = pattern('^then\\\\s+no\\\\s+events\\\\b');\n\n// An instant in ISO 8601 - a date, a time to the minute or finer, and an explicit offset or Z - so the same text\n// means the same moment wherever the specification runs.\nconst clockPattern = pattern('^(given|when)\\\\s+clock\\\\s+\"(\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}(?::\\\\d{2}(?:\\\\.\\\\d+)?)?(?:Z|[+-]\\\\d{2}:\\\\d{2}))\"$');\nconst whenTriggerPattern = pattern('^when\\\\s+trigger\\\\s+([A-Za-z_]\\\\w*)$');\nconst capturePattern = pattern('^(?:given|when)\\\\s+capture\\\\s+([A-Za-z_]\\\\w*)$');\nconst whenQueryPattern = pattern('^when\\\\s+query\\\\s+([A-Za-z_]\\\\w*(?:\\\\.\\\\w+)*)$');\nconst thenResultPattern = pattern('^then\\\\s+result(\\\\s+exactly)?$');\nconst thenAbsentReadModelPattern = nativePattern('^then\\\\s+no\\\\s+readmodel\\\\s+([A-Z]\\\\w*)\\\\s+for\\\\s+(.+)$');\nconst absentKeyStringPattern = nativePattern(`^(?:\"${stringBodyPattern}\"|'(?:[^'\\\\\\\\]|\\\\\\\\.)*')$`);\nconst thenQueryPattern = nativePattern('^then\\\\s+query\\\\s+([A-Za-z_]\\\\w*(?:\\\\.\\\\w+)*)(\\\\s+exactly)?$');\n\ninterface SpecificationBody {\n given: SpecificationEventSyntax[];\n givenReadModels: SpecificationReadModelSyntax[];\n when: SpecificationCommandSyntax | null;\n whenAppended: SpecificationEventSyntax | null;\n whenRedelivered: SpecificationRedeliverySyntax | null;\n whenDeclared: boolean;\n thenEvents: SpecificationEventSyntax[];\n thenEventsInAnyOrder: boolean;\n thenNoEvents: boolean;\n noEventsLine?: SourceLine;\n thenReadModels: SpecificationReadModelSyntax[];\n thenErrors: SpecificationErrorSyntax[];\n thenAbsentReadModels: SpecificationAbsentReadModelSyntax[];\n thenQueries: SpecificationQuerySyntax[];\n givenClock: SpecificationClockSyntax | null;\n givenTimeZone: SpecificationTimeZoneSyntax | null;\n givenCaptures: SpecificationCaptureSyntax[];\n givenGenerated?: SpecificationGeneratedValueSyntax[];\n whenClock: SpecificationClockSyntax | null;\n whenTrigger: SpecificationTriggerSyntax | null;\n whenCapture: SpecificationCaptureSyntax | null;\n whenQuery: SpecificationWhenQuerySyntax | null;\n thenResults: SpecificationQueryResultSyntax[];\n thenNoResult: SpecificationNoResultSyntax | null;\n thenDenied: SpecificationDeniedSyntax | null;\n givenCaller: SpecificationCallerSyntax | null;\n givenCallerPersona?: SpecificationCallerPersonaSyntax;\n thenReturns: SpecificationReturnSyntax | null;\n givenOperationFailures: SpecificationOperationFailureSyntax[];\n thenOperations: SpecificationOperationSyntax[];\n thenCompensated: SpecificationCompensatedSyntax[];\n thenInvocations?: SpecificationInvocationSyntax[];\n}\n\nexport function parseSpecification(context: ParserContext, line: SourceLine): SpecificationSyntax {\n const name = header.exec(line.content)?.[1] ?? '';\n if (name === '') {\n context.error(DiagnosticCodes.InvalidSpecificationDeclaration, `Invalid specification declaration '${line.content}' - expected 'specification <Name>'`, locationOf(line));\n }\n let description: string | null = null;\n const parameters: NonNullable<SpecificationSyntax['parameters']>[number][] = [];\n const cases: NonNullable<SpecificationSyntax['cases']>[number][] = [];\n const body: SpecificationBody = {\n givenOperationFailures: [], thenOperations: [], thenCompensated: [], thenAbsentReadModels: [], thenQueries: [],\n given: [], givenReadModels: [], when: null, whenAppended: null, whenRedelivered: null, whenDeclared: false,\n thenEvents: [], thenEventsInAnyOrder: false, thenNoEvents: false, thenReadModels: [], thenErrors: [],\n givenClock: null, givenTimeZone: null, givenCaptures: [], whenClock: null, whenTrigger: null, whenCapture: null, whenQuery: null, thenResults: [], thenNoResult: null, thenDenied: null, givenCaller: null, thenReturns: null,\n };\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n if (isFileDirective(child)) {\n continue;\n }\n if (parseOperationStep(context, child, body)) continue;\n // Absence assertions admit any whitespace after 'then'; every other directive keeps its first word.\n const keyword = thenNoPrefix.test(child.content) ? 'then' : firstWord(child.content);\n if (keyword === 'parameter') {\n const parameter = parseParameter(context, child);\n if (parameter !== null) parameters.push(parameter);\n } else if (keyword === 'case') {\n const row = parseCase(context, child);\n if (row !== null) cases.push(row);\n } else if (keyword === 'description') {\n description = parseDescription(context, child, description, `Specification '${name}'`);\n } else if (keyword === 'given') {\n parseGiven(context, child, body);\n } else if (keyword === 'when') {\n parseWhen(context, child, body, name);\n } else if (keyword === 'then') {\n parseThen(context, child, body);\n } else {\n context.error(DiagnosticCodes.UnknownSpecificationDirective, `Unexpected '${firstWord(child.content)}' in specification body`, locationOf(child));\n context.skipBlock(child.indent);\n }\n }\n if (body.noEventsLine !== undefined && (body.thenEvents.length > 0 || body.thenEventsInAnyOrder || body.thenErrors.length > 0 || body.thenDenied !== null)) {\n context.error(DiagnosticCodes.InvalidNoEventsExpectation,\n \"'then no events' cannot accompany event, event-order, error or denial expectations.\", locationOf(body.noEventsLine));\n }\n validateQueryRejection(context, line, body);\n const { whenDeclared: _, noEventsLine: _noEventsLine, ...members } = body;\n const specification: SpecificationSyntax = { kind: 'SpecificationSyntax', sourceOptions: context.sourceOptions, name, description, ...members,\n ...(parameters.length === 0 ? {} : { parameters }), ...(cases.length === 0 ? {} : { cases }), location: locationOf(line) };\n validateTable(specification, context);\n return specification;\n}\n\nfunction validateQueryRejection(context: ParserContext, line: SourceLine, body: SpecificationBody): void {\n if (!isQueryRejectionCandidate(body) || isWellFormedQueryRejection(body)) return;\n context.error(DiagnosticCodes.MismatchedSpecificationQueryResult,\n \"A query rejection requires exactly one query and one 'then error', no action, and no other outcomes\", locationOf(line));\n}\n\nfunction isQueryRejectionCandidate(body: SpecificationBody): boolean {\n return body.thenErrors.length > 0 && queriedCallCount(body) > 0 && (body.whenQuery !== null || !hasAction(body));\n}\n\nfunction isWellFormedQueryRejection(body: SpecificationBody): boolean {\n return !hasAction(body) && hasOneQueryAndOneError(body) && !hasOtherOutcome(body);\n}\n\nfunction hasOneQueryAndOneError(body: SpecificationBody): boolean {\n return queriedCallCount(body) === 1 && body.thenErrors.length === 1;\n}\n\nfunction hasAction(body: SpecificationBody): boolean {\n return [body.when, body.whenAppended, body.whenClock, body.whenTrigger, body.whenCapture, body.whenRedelivered].some(action => action !== null);\n}\n\nfunction queriedCallCount(body: SpecificationBody): number {\n return body.thenQueries.length + (body.whenQuery === null ? 0 : 1);\n}\n\nfunction hasOtherOutcome(body: SpecificationBody): boolean {\n return [\n body.thenResults.length > 0,\n body.thenNoResult !== null,\n body.thenDenied !== null,\n body.thenEvents.length > 0,\n body.thenNoEvents,\n body.thenEventsInAnyOrder,\n body.thenReadModels.length > 0,\n body.thenAbsentReadModels.length > 0,\n body.thenReturns !== null,\n body.thenQueries.some(query => query.results.length > 0)\n ].some(outcome => outcome);\n}\n\nfunction parseOperationStep(context: ParserContext, line: SourceLine, body: SpecificationBody): boolean {\n if (!operationStepPrefix.test(line.content)) return false;\n const match = operationStep.exec(line.content);\n if (match === null || (match[1] === 'given operation') !== (match[3] !== undefined)) {\n context.error(DiagnosticCodes.InvalidOperationSpecification, \"Expected 'given operation <Name> fails', 'then operation <Name>' or 'then compensated <Name>'.\", locationOf(line));\n skipBody(context, line.indent);\n } else if (match[1] === 'then operation') {\n const values: PropertyMappingSyntax[] = [];\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n const value = parseConcreteMapping(context, child, mappingPattern, DiagnosticCodes.InvalidOperationSpecification);\n if (value !== null) values.push(value);\n }\n body.thenOperations.push({ kind: 'SpecificationOperationSyntax', operation: match[2], values, location: locationOf(line) });\n } else {\n rejectOperationChildren(context, line, DiagnosticCodes.InvalidOperationSpecification, 'Failure and compensation assertions cannot have children.');\n if (match[1] === 'given operation') body.givenOperationFailures.push({ kind: 'SpecificationOperationFailureSyntax', operation: match[2], location: locationOf(line) });\n else body.thenCompensated.push({ kind: 'SpecificationCompensatedSyntax', operation: match[2], location: locationOf(line) });\n }\n return true;\n}\n\nfunction parseGiven(context: ParserContext, line: SourceLine, body: SpecificationBody): void {\n if (givenClockPrefix.test(line.content)) {\n if (body.givenClock !== null) {\n context.error(DiagnosticCodes.InvalidSpecificationClock, 'A specification states its clock at most once.', locationOf(line));\n skipBody(context, line.indent);\n } else {\n body.givenClock = parseClock(context, line, 'given');\n }\n } else if (givenTimeZonePrefix.test(line.content)) {\n const match = givenTimeZonePattern.exec(line.content);\n skipBody(context, line.indent);\n if (body.givenTimeZone !== null || match === null) {\n context.error(DiagnosticCodes.InvalidSpecificationTimeZone, \"A specification states its time zone at most once, as 'given time zone \\\"<id>\\\"'.\", locationOf(line));\n } else {\n body.givenTimeZone = { kind: 'SpecificationTimeZoneSyntax', id: unescapeString(match[1]), location: locationOf(line) };\n }\n } else if (givenGeneratedPrefix.test(line.content)) {\n const pinned = parseGivenGenerated(context, line);\n if (pinned !== null) {\n (body.givenGenerated ??= []).push(pinned);\n }\n } else if (givenCapturePrefix.test(line.content)) {\n const capture = parseCapture(context, line, 'given');\n if (capture !== null) {\n body.givenCaptures.push(capture);\n }\n } else if (line.content.startsWith('given caller')) {\n if (body.givenCaller !== null || body.givenCallerPersona !== undefined) {\n context.error(DiagnosticCodes.DuplicateSpecificationCallerOrDenied, \"A specification has at most one 'given caller' block.\", locationOf(line));\n context.skipBlock(line.indent);\n } else if (line.content.startsWith('given caller as')) {\n const match = callerPersonaPattern.exec(line.content);\n if (match === null) context.error(DiagnosticCodes.InvalidSpecificationCallerPersona, \"Expected 'given caller as <Persona>'.\", locationOf(line));\n const child = context.peekChild(line.indent);\n if (child !== undefined) context.error(DiagnosticCodes.InvalidSpecificationCallerPersona, \"'given caller as <Persona>' has no body; use an explicit 'given caller' for refinements.\", locationOf(child));\n skipBody(context, line.indent);\n if (match !== null) body.givenCallerPersona = { kind: 'SpecificationCallerPersonaSyntax', name: match[1], location: locationOf(line) };\n } else {\n body.givenCaller = parseCaller(context, line);\n }\n } else if (readModelPrefix.test(line.content)) {\n const readModel = parseReadModelStep(context, line, givenReadModelPattern, 'given');\n if (readModel !== undefined) {\n body.givenReadModels.push(readModel);\n }\n } else {\n const event = parseEventStep(context, line, givenPattern, 'given');\n if (event !== undefined) {\n body.given.push(event);\n }\n }\n}\n\nconst callerRolePattern = pattern(`^role${dotNetWhitespace}+\"(${stringBodyPattern})\"$`);\nconst callerClaimPattern = pattern(`^claim${dotNetWhitespace}+\"(${stringBodyPattern})\"${dotNetWhitespace}*=${dotNetWhitespace}*\"(${stringBodyPattern})\"$`);\n\n// 'given caller' and the authenticated, role and claim lines under it.\nfunction parseCaller(context: ParserContext, line: SourceLine): SpecificationCallerSyntax | null {\n if (line.content !== 'given caller') {\n context.error(DiagnosticCodes.InvalidSpecificationCaller, \"Expected exactly 'given caller'.\", locationOf(line));\n context.skipBlock(line.indent);\n return null;\n }\n let authenticated = false;\n const roles: string[] = [];\n const claims: SpecificationCallerClaimSyntax[] = [];\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n const role = callerRolePattern.exec(child.content);\n const claim = callerClaimPattern.exec(child.content);\n if (child.content === 'authenticated' && !authenticated) {\n authenticated = true;\n } else if (role !== null) {\n roles.push(unescapeString(role[1]));\n } else if (claim !== null) {\n claims.push({ kind: 'SpecificationCallerClaimSyntax', type: unescapeString(claim[1]), value: unescapeString(claim[2]), location: locationOf(child) });\n } else {\n context.error(containsCaseReference(child.content) ? DiagnosticCodes.InvalidSpecificationCaseReference : DiagnosticCodes.InvalidSpecificationCaller, `Invalid caller fixture '${child.content}' - expected authenticated, role \"...\", or claim \"...\" = \"...\".`, locationOf(child));\n }\n }\n return { kind: 'SpecificationCallerSyntax', authenticated, roles, claims, location: locationOf(line) };\n}\n\nfunction parseWhen(context: ParserContext, line: SourceLine, body: SpecificationBody, name: string): void {\n const appends = line.content.startsWith('when append');\n if (body.whenDeclared) {\n const code = body.whenAppended !== null || appends ? DiagnosticCodes.ConflictingSpecificationActions : DiagnosticCodes.DuplicateSpecificationWhen;\n context.error(code, `Specification '${name}' already declares a 'when' - a specification can have at most one`, locationOf(line));\n skipBody(context, line.indent);\n return;\n }\n body.whenDeclared = true;\n if (appends) {\n body.whenAppended = parseEventStep(context, line, whenAppendPattern, 'when append') ?? null;\n return;\n }\n if (whenRedeliveredPrefix.test(line.content)) {\n const match = whenRedeliveredPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.UnmatchedRedeliveredOccurrence, \"Expected 'when redelivered <Event> to <Reaction>'.\", locationOf(line));\n skipBody(context, line.indent);\n } else {\n body.whenRedelivered = { kind: 'SpecificationRedeliverySyntax', eventType: match[1], reaction: match[2], ...parseValuesWithEventSource(context, line, undefined, undefined, 'when redelivered'), location: locationOf(line) };\n }\n return;\n }\n if (whenClockPrefix.test(line.content)) {\n body.whenClock = parseClock(context, line, 'when');\n return;\n }\n if (whenTriggerPrefix.test(line.content)) {\n body.whenTrigger = parseNamedStep(context, line, whenTriggerPattern, DiagnosticCodes.InvalidSpecificationTrigger, 'when trigger', 'when trigger <Trigger>',\n (trigger, values) => ({ kind: 'SpecificationTriggerSyntax', trigger, values, location: locationOf(line) }));\n return;\n }\n if (whenCapturePrefix.test(line.content)) {\n body.whenCapture = parseCapture(context, line, 'when');\n return;\n }\n if (whenQueryPrefix.test(line.content)) {\n body.whenQuery = parseNamedStep(context, line, whenQueryPattern, DiagnosticCodes.InvalidSpecificationQueryAction, 'when query', 'when query <Query>',\n (query, values) => ({ kind: 'SpecificationWhenQuerySyntax', query, arguments: values, location: locationOf(line) }), true);\n return;\n }\n const match = whenPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidSpecificationWhen, `Invalid 'when' declaration '${line.content}' - expected 'when <CommandType>' or 'when append <EventType>'`, locationOf(line));\n skipBody(context, line.indent);\n return;\n }\n const generatedValues: PropertyMappingSyntax[] = [];\n const values = parseValuesWithEventSource(context, line, generatedValues, match);\n body.when = { kind: 'SpecificationCommandSyntax', commandType: match[1], ...values, generatedValues, inlineProperty: match.groups?.property ?? null, location: locationOf(line) };\n}\n\nfunction parseThen(context: ParserContext, line: SourceLine, body: SpecificationBody): void {\n if (noEventsPrefix.test(line.content)) {\n if (line.content !== 'then no events' || body.thenNoEvents) {\n context.error(DiagnosticCodes.InvalidNoEventsExpectation, \"Expected one 'then no events' directive.\", locationOf(line));\n } else {\n body.thenNoEvents = true;\n body.noEventsLine = line;\n }\n const child = context.peekChild(line.indent);\n if (child !== undefined) context.error(DiagnosticCodes.InvalidNoEventsExpectation, \"'then no events' cannot have child mappings.\", locationOf(child));\n skipBody(context, line.indent);\n return;\n }\n if (thenReturnsPrefix.test(line.content)) {\n const expectation = parseReturn(context, line);\n if (body.thenReturns !== null) {\n context.error(DiagnosticCodes.InvalidReturnExpectation, 'A specification declares at most one return expectation.', locationOf(line));\n } else {\n body.thenReturns = expectation;\n }\n return;\n }\n if (line.content.startsWith('then events')) {\n if (line.content !== 'then events in any order' || body.thenEventsInAnyOrder) {\n context.error(DiagnosticCodes.InvalidSpecificationEventOrder, 'Expected one \\'then events in any order\\' directive.', locationOf(line));\n } else {\n body.thenEventsInAnyOrder = true;\n }\n skipBody(context, line.indent);\n return;\n }\n if (thenResultPrefix.test(line.content)) {\n parseResult(context, line, body);\n return;\n }\n if (noResultPrefix.test(line.content)) {\n if (line.content !== 'then no result' || body.thenNoResult !== null) {\n context.error(DiagnosticCodes.InvalidSpecificationQueryAction, 'Expected one \\'then no result\\' directive.', locationOf(line));\n } else {\n body.thenNoResult = { kind: 'SpecificationNoResultSyntax', location: locationOf(line) };\n }\n skipBody(context, line.indent);\n return;\n }\n if (thenInvokesPrefix.test(line.content)) {\n const invocation = parseNamedStep(context, line, thenInvokesPattern, DiagnosticCodes.InvalidSpecificationInvocation, 'then invokes', 'then invokes <Command>',\n (command, values): SpecificationInvocationSyntax => ({ kind: 'SpecificationInvocationSyntax', command, values, location: locationOf(line) }));\n if (invocation !== null) (body.thenInvocations ??= []).push(invocation);\n return;\n }\n if (line.content.startsWith('then denied')) {\n if (line.content !== 'then denied') {\n context.error(DiagnosticCodes.InvalidSpecificationDenied, 'Expected exactly \\'then denied\\'.', locationOf(line));\n skipBody(context, line.indent);\n } else if (body.thenDenied !== null) {\n context.error(DiagnosticCodes.DuplicateSpecificationCallerOrDenied, \"A specification has at most one 'then denied' outcome.\", locationOf(line));\n } else {\n body.thenDenied = { kind: 'SpecificationDeniedSyntax', location: locationOf(line) };\n }\n return;\n }\n if (line.content === 'then error') {\n body.thenErrors.push({ kind: 'SpecificationErrorSyntax', name: null, location: locationOf(line) });\n return;\n }\n if (line.content.startsWith('then error case.')) {\n const caseValue = parseMappingSource(line.content.substring(11), { ...locationOf(line), column: locationOf(line).column + 11 }, context);\n if (caseValue.kind === 'CaseValueExpressionSyntax') body.thenErrors.push({ kind: 'SpecificationErrorSyntax', name: null, caseValue, location: locationOf(line) });\n return;\n }\n const error = thenErrorPattern.exec(line.content);\n if (error !== null) {\n body.thenErrors.push({ kind: 'SpecificationErrorSyntax', name: unescapeString(error[1]), location: locationOf(line) });\n return;\n }\n if (firstWord(line.content.substring('then'.length).trim()) === 'error') {\n context.error(DiagnosticCodes.InvalidThenError, `Invalid 'then error' declaration '${line.content}' - expected 'then error' or 'then error \"<reason>\"'`, locationOf(line));\n skipBody(context, line.indent);\n return;\n }\n if (thenNoPrefix.test(line.content)) {\n // Legacy documents keep skipping these assertions silently; Exact mirrors the native diagnostics.\n if (context.sourceOptions.numericMode === 'exact') {\n const absent = parseAbsentReadModel(context, line);\n if (absent !== null) body.thenAbsentReadModels.push(absent);\n return;\n }\n const match = thenAbsentReadModelPattern.exec(line.content);\n if (match !== null && !match[2].endsWith(' exactly')) {\n const key = parseMappingSource(match[2].trim(), locationOf(line), context.valueContext);\n if (key.kind === 'LiteralExpressionSyntax' || key.kind === 'ObjectExpressionSyntax' || key.kind === 'CaseValueExpressionSyntax') body.thenAbsentReadModels.push({ kind: 'SpecificationAbsentReadModelSyntax', name: match[1], key, location: locationOf(line) });\n }\n context.skipOpaqueBlock(line.indent);\n return;\n }\n if (thenQueryPrefix.test(line.content)) {\n // Legacy documents keep skipping malformed query bodies silently; Exact reports what the native parser reports.\n const exact = context.sourceOptions.numericMode === 'exact';\n const reject = (code: string, message: string, at: SourceLine): void => {\n if (!exact) return context.skipOpaqueBlock(at.indent);\n context.error(code, message, locationOf(at));\n context.skipBlock(at.indent);\n };\n const match = thenQueryPattern.exec(line.content);\n if (match === null) return reject(DiagnosticCodes.InvalidSpecificationQuery, `Invalid 'then query' declaration '${line.content}' - expected 'then query <Query> [exactly]'`, line);\n const args: PropertyMappingSyntax[] = [];\n const results: SpecificationQueryResultSyntax[] = [];\n let hasArguments = false;\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n if (child.content === 'arguments' && !hasArguments) args.push(...parseValues(context.valueContext, child, true, undefined, context));\n else if (child.content === 'arguments') reject(DiagnosticCodes.DuplicateSpecificationQueryArguments, `Query assertion '${match[1]}' already declares arguments`, child);\n else if (child.content === 'result') results.push({ kind: 'SpecificationQueryResultSyntax', properties: parseValues(context.valueContext, child, true), exactly: false, location: locationOf(child) });\n else reject(DiagnosticCodes.UnknownSpecificationQueryDirective, `Unexpected '${firstWord(child.content)}' in 'then query' body - expected arguments or result`, child);\n hasArguments ||= child.content === 'arguments';\n }\n body.thenQueries.push({ kind: 'SpecificationQuerySyntax', query: match[1], arguments: args, results, exactly: match[2] !== undefined, location: locationOf(line) });\n return;\n }\n if (readModelPrefix.test(line.content)) {\n const readModel = parseReadModelStep(context, line, thenReadModelPattern, 'then');\n if (readModel !== undefined) {\n body.thenReadModels.push(readModel);\n }\n return;\n }\n const event = parseEventStep(context, line, thenEventPattern, 'then');\n if (event !== undefined) {\n body.thenEvents.push(event);\n }\n}\n\n// The Exact port of C# ParseAbsentReadModel: every malformed part is reported rather than dropped.\nfunction parseAbsentReadModel(context: ParserContext, line: SourceLine): SpecificationAbsentReadModelSyntax | null {\n const match = thenAbsentReadModelPattern.exec(line.content);\n if (match === null || match[2].endsWith(' exactly')) {\n context.error(DiagnosticCodes.InvalidAbsentReadModelStep, `Invalid absence assertion '${line.content}' - expected 'then no readmodel <ReadModelType> for <key>'`, locationOf(line));\n skipBody(context, line.indent);\n return null;\n }\n const keyText = match[2].trim();\n const validString = !(keyText.startsWith('\"') || keyText.startsWith(\"'\")) || absentKeyStringPattern.test(keyText);\n const key = validString ? parseMappingSource(keyText, locationOf(line), context.valueContext) : null;\n const concrete = key !== null && (key.kind === 'LiteralExpressionSyntax' || key.kind === 'ObjectExpressionSyntax' || key.kind === 'CaseValueExpressionSyntax');\n if (!concrete) context.error(DiagnosticCodes.InvalidAbsentReadModelStep, `Invalid absence key '${keyText}' - expected exactly one concrete value.`, locationOf(line));\n let hasChildren = false;\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n context.error(DiagnosticCodes.InvalidAbsentReadModelStep, 'An absent read model assertion cannot have child mappings.', locationOf(child));\n hasChildren = true;\n }\n return hasChildren || !concrete ? null : { kind: 'SpecificationAbsentReadModelSyntax', name: match[1], key, location: locationOf(line) } as SpecificationAbsentReadModelSyntax;\n}\n\nfunction skipBody(context: ParserContext, indent: number): void {\n if (context.sourceOptions.numericMode !== 'exact') return context.skipBlock(indent);\n context.skipOpaqueBlock(indent);\n}\n\nfunction parseClock(context: ParserContext, line: SourceLine, keyword: string): SpecificationClockSyntax | null {\n const match = clockPattern.exec(line.content);\n skipBody(context, line.indent);\n if (match === null || match[1] !== keyword) {\n context.error(containsCaseReference(line.content) ? DiagnosticCodes.InvalidSpecificationCaseReference : DiagnosticCodes.InvalidSpecificationClock,\n `Invalid '${keyword} clock' - expected '${keyword} clock \"<ISO 8601 instant>\"', such as '${keyword} clock \"2026-10-05T08:00:00Z\"'`, locationOf(line));\n return null;\n }\n return { kind: 'SpecificationClockSyntax', instant: match[2], location: locationOf(line) };\n}\n\nfunction parseGivenGenerated(context: ParserContext, line: SourceLine): SpecificationGeneratedValueSyntax | null {\n const match = givenGeneratedPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidGeneratedFixture, \"Expected 'given generated <Command>.<property> = <value>' with exactly one concrete value.\", locationOf(line));\n context.skipBlock(line.indent);\n return null;\n }\n const location = locationOf(line);\n const source = parseConcrete(context, match[3], { ...location, column: location.column + line.content.indexOf(match[3], line.content.indexOf('=') + 1) }, DiagnosticCodes.InvalidGeneratedFixture);\n const child = context.peekChild(line.indent);\n if (child !== undefined) {\n context.error(DiagnosticCodes.InvalidGeneratedFixture, 'A pinned generated value cannot have child directives.', locationOf(child));\n context.skipBlock(line.indent);\n }\n return source === null ? null : { kind: 'SpecificationGeneratedValueSyntax', command: match[1], property: match[2], source, location };\n}\n\nfunction parseCapture(context: ParserContext, line: SourceLine, keyword: string): SpecificationCaptureSyntax | null {\n return parseNamedStep(context, line, capturePattern, DiagnosticCodes.InvalidSpecificationCapture, `${keyword} capture`, `${keyword} capture <Capture>`,\n (capture, record) => ({ kind: 'SpecificationCaptureSyntax', capture, record, location: locationOf(line) }));\n}\n\n// A step naming one thing on its header line, with '<field> = <value>' lines beneath it.\nfunction parseNamedStep<T>(\n context: ParserContext, line: SourceLine, regex: RegExp, code: string, keyword: string, expected: string,\n create: (name: string, values: PropertyMappingSyntax[]) => T, queryArguments = false): T | null {\n const match = regex.exec(line.content);\n if (match === null) {\n context.error(code, `Invalid '${keyword}' declaration '${line.content}' - expected '${expected}'`, locationOf(line));\n skipBody(context, line.indent);\n return null;\n }\n return create(match[1], parseValues(context, line, false, undefined, queryArguments ? context : undefined));\n}\n\nfunction parseResult(context: ParserContext, line: SourceLine, body: SpecificationBody): void {\n const match = thenResultPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidSpecificationQueryAction, `Invalid 'then result' declaration '${line.content}' - expected 'then result [exactly]'`, locationOf(line));\n skipBody(context, line.indent);\n return;\n }\n body.thenResults.push({ kind: 'SpecificationQueryResultSyntax', properties: parseValues(context, line), exactly: match[1] !== undefined, location: locationOf(line) });\n}\n\nfunction parseReadModelStep(context: ParserContext, line: SourceLine, regex: RegExp, keyword: string): SpecificationReadModelSyntax | undefined {\n const match = regex.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidReadModelStep, `Invalid '${keyword} readmodel' declaration '${line.content}' - expected '${keyword} readmodel <ReadModelType>'`, locationOf(line));\n skipBody(context, line.indent);\n return undefined;\n }\n return {\n kind: 'SpecificationReadModelSyntax',\n name: match[1],\n properties: parseValues(context, line, false, match),\n exactly: keyword === 'then' && match.groups?.exactly !== undefined,\n inlineProperty: match.groups?.property ?? null,\n location: locationOf(line),\n };\n}\n\nfunction parseEventStep(context: ParserContext, line: SourceLine, regex: RegExp, keyword: string): SpecificationEventSyntax | undefined {\n const match = regex.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidEventStep, `Invalid '${keyword}' declaration '${line.content}' - expected '${keyword} <EventType>'`, locationOf(line));\n skipBody(context, line.indent);\n return undefined;\n }\n return { kind: 'SpecificationEventSyntax', eventType: match[1], ...parseValuesWithEventSource(context, line, undefined, match, keyword), inlineProperty: match.groups?.property ?? null, location: locationOf(line) };\n}\n\nexport const specificationStream = sourceStreamPattern('^stream\\\\s+([A-Za-z_]\\\\w*)\\\\.([A-Za-z_]\\\\w*)$');\nconst specificationStreamId = pattern('^streamId\\\\s*=(?!=|>)\\\\s*(.+)$');\n\nfunction parseValuesWithEventSource(context: ParserContext, parent: SourceLine, generated?: PropertyMappingSyntax[], inline?: RegExpExecArray, eventKeyword?: string): { values: PropertyMappingSyntax[]; for: ExpressionSyntax | null; stream?: SpecificationStreamSyntax; noStream?: SpecificationNoStreamSyntax } {\n const values: PropertyMappingSyntax[] = [];\n addInlineValue(context, parent, inline, values);\n let eventSource: ExpressionSyntax | null = null;\n let stream: SpecificationStreamSyntax | undefined;\n let noStream: SpecificationNoStreamSyntax | undefined;\n let hasRoute = false;\n for (let child = context.peekChild(parent.indent); child !== undefined; child = context.peekChild(parent.indent)) {\n context.reader.takeSignificant();\n if (generated !== undefined && generatedFixturePrefix.test(child.content)) {\n const fixture = parseConcreteMapping(context, child, generatedFixturePattern, DiagnosticCodes.InvalidGeneratedFixture);\n if (fixture !== null) generated.push(fixture);\n continue;\n }\n const mapping = mappingPattern.exec(child.content);\n if (mapping !== null) {\n addFixtureValue(context, values, mappingOf(context, child, mapping));\n } else if (firstWord(child.content) === 'stream' || child.content.startsWith('no stream')) {\n if (eventKeyword === undefined) {\n context.error(DiagnosticCodes.SpecificationStreamOnCommand, 'A command occurrence cannot declare a route; assert it on a then event.', locationOf(child));\n context.skipBlock(child.indent);\n continue;\n }\n if (hasRoute) {\n context.error(DiagnosticCodes.InvalidSpecificationStream, 'An event occurrence declares at most one stream or no stream directive.', locationOf(child));\n context.skipBlock(child.indent);\n continue;\n }\n const route = specificationStream.exec(child.content);\n if (child.content === 'no stream' && (eventKeyword === 'then' || eventKeyword === 'when redelivered')) {\n noStream = { kind: 'SpecificationNoStreamSyntax', location: locationOf(child) };\n hasRoute = true;\n rejectSpecificationRouteChildren(context, child);\n } else if (route !== null) {\n stream = parseSpecificationStream(context, child, route);\n hasRoute = true;\n } else {\n context.error(DiagnosticCodes.InvalidSpecificationStream, \"Expected 'stream Source.Stream', or 'no stream' on a then event.\", locationOf(child));\n context.skipBlock(child.indent);\n }\n } else if (firstWord(child.content) === 'for') {\n const source = child.content.substring('for'.length).trim();\n if (source.length === 0) {\n context.error(DiagnosticCodes.InvalidSpecificationEventSource, 'Invalid event-source assertion \\'for\\' - expected \\'for <value>\\'', locationOf(child));\n } else if (eventSource !== null) {\n context.error(DiagnosticCodes.DuplicateSpecificationEventSource, 'A specification step can declare its event-source assertion only once', locationOf(child));\n } else {\n eventSource = parseMappingSource(source, locationOf(child), context);\n }\n } else {\n context.error(DiagnosticCodes.InvalidSpecificationValue, `Invalid property mapping '${child.content}' - expected '<property> = <value>'`, locationOf(child), diagnosticText('text', child.content));\n }\n }\n return { values, for: eventSource, ...(stream === undefined ? {} : { stream }), ...(noStream === undefined ? {} : { noStream }) };\n}\n\nexport function parseSpecificationStream(context: ParserContext, header: SourceLine, route: RegExpExecArray): SpecificationStreamSyntax {\n let streamId: PropertyMappingSyntax | null = null;\n let streamIdParts: PropertyMappingSyntax[] = [];\n let block = false;\n const directiveLocations: Record<string, ReturnType<typeof locationOf>> = {};\n for (let child = context.peekChild(header.indent); child !== undefined; child = context.peekChild(header.indent)) {\n context.reader.takeSignificant();\n if (child.content === 'streamId') {\n if (streamId !== null || block) {\n context.error(DiagnosticCodes.InvalidSpecificationStream, \"Declare either one 'streamId = <literal>' mapping or one streamId part block.\", locationOf(child));\n context.skipBlock(child.indent);\n } else {\n block = true;\n directiveLocations.streamId = locationOf(child);\n streamIdParts = parseRouteParts(context, child, DiagnosticCodes.InvalidSpecificationStream).map(part => part.source.kind === 'PathExpressionSyntax' && part.source.path.startsWith('case.')\n ? { ...part, source: parseMappingSource(part.source.path, part.source.location, context) } : part);\n }\n continue;\n }\n const mapping = specificationStreamId.exec(child.content);\n if (mapping === null || streamId !== null || block) {\n context.error(DiagnosticCodes.InvalidSpecificationStream, \"Declare either one 'streamId = <literal>' mapping or one streamId part block.\", locationOf(child));\n context.skipBlock(child.indent);\n continue;\n }\n const location = { ...locationOf(child), column: child.indent + 1 + child.content.indexOf(mapping[1], child.content.indexOf('=') + 1) };\n streamId = { kind: 'PropertyMappingSyntax', property: 'streamId', source: parseMappingSource(mapping[1], location, context), location: locationOf(child) };\n rejectSpecificationRouteChildren(context, child);\n }\n return { kind: 'SpecificationStreamSyntax', eventSource: route[1], stream: route[2], streamId, streamIdParts, directiveLocations,\n referenceLocation: { ...locationOf(header), column: header.indent + 1 + header.content.indexOf(route[1], 'stream'.length) },\n referenceLength: route[1].length + 1 + route[2].length, location: locationOf(header) };\n}\n\nexport function rejectSpecificationRouteChildren(context: ParserContext, line: SourceLine): void {\n const child = context.peekChild(line.indent);\n if (child !== undefined) {\n context.error(DiagnosticCodes.InvalidSpecificationStream, 'This directive cannot have children.', locationOf(child));\n context.skipBlock(line.indent);\n }\n}\n\nfunction parseValues(context: ParserContext, parent: SourceLine, nativeIdentifiers = false, inline?: RegExpExecArray, queryArgumentsContext?: ParserContext): PropertyMappingSyntax[] {\n const values: PropertyMappingSyntax[] = [];\n addInlineValue(context, parent, inline, values);\n for (let child = context.peekChild(parent.indent); child !== undefined; child = context.peekChild(parent.indent)) {\n context.reader.takeSignificant();\n const mapping = (nativeIdentifiers || context.sourceOptions.numericMode === 'exact' ? nativeMappingPattern : mappingPattern).exec(child.content);\n if (mapping === null) {\n context.error(DiagnosticCodes.InvalidSpecificationValue, `Invalid property mapping '${child.content}' - expected '<property> = <value>'`, locationOf(child), diagnosticText('text', child.content));\n continue;\n }\n const value = mappingOf(context, child, mapping, nativeIdentifiers);\n if (queryArgumentsContext !== undefined) {\n if (values.some(existing => existing.property === value.property)) {\n queryArgumentsContext.error(DiagnosticCodes.UnknownSpecificationQueryArgument, `Query argument '${value.property}' is repeated.`, value.location, diagnosticText('argument', value.property));\n }\n values.push(value);\n } else {\n addFixtureValue(context, values, value);\n }\n }\n return values;\n}\n\nfunction mappingOf(context: ParserContext, line: SourceLine, match: RegExpExecArray, nativeIdentifiers = false): PropertyMappingSyntax {\n return { kind: 'PropertyMappingSyntax', property: match[1], source: parseMappingSource(match[2], locationOf(line), context, nativeIdentifiers), location: locationOf(line) };\n}\n"],"mappings":"spCA2BA,MAAMC,EAAsBC,EAAQ,oEAAoE,EAClGC,EAAgBD,EAAQ,yGAAyG,EACjIE,EAASF,EAAQ,oCAAoC,EACrDG,EAAuBH,EAAQ,mCAAmC,EAGlE,aAAe,EAAgB,EAAU,KAAeI,EAAc,IAAIC,EAAO,6BAAiBC,8DAA8B,WAAW,MAAOC,CAAgB,CAAC,EACnKC,EAAe,YAAY,OAAO,EAClCC,EAAoB,YAAY,gBAAgB,EAChDC,EAAc,YAAY,MAAM,EAChCC,EAAmB,YAAY,MAAM,EACrCC,EAAkBZ,EAAQ,mBAAmB,EAC7Ca,EAAkBb,EAAQ,iCAAiC,EAC3Dc,EAAwB,YAAY,oBAAoB,EACxDC,EAAuB,YAAY,oBAAqB,0BAA0B,EAClFC,EAAehB,EAAQ,gBAAgB,EACvCiB,EAAmBjB,EAAQ,uBAAuBkB,EAAkB,IAAI,EACxEC,EAAiBnB,EAAQ,iCAAiC,EAC1DoB,EAAuBhB,EAAc,iCAAiC,EACtEiB,EAAsBrB,EAAQ,2BAA2B,EACzDsB,EAAuBtB,EAAQ,+BAA+BkB,EAAkB,IAAI,EACpFK,EAAmBvB,EAAQ,oBAAoB,EAC/CwB,GAAqBxB,EAAQ,sBAAsB,EACnDyB,EAAoBzB,EAAQ,qBAAqB,EACjD0B,EAAqB1B,EAAQ,2DAA2D,EACxF2B,EAAuB3B,EAAQ,wBAAwB,EACvD4B,EA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AA6BM,EAAM,QAAQ,qCAAsCL,EAAWK,CAAK,EAAGkF,EAAe,OAAQlF,EAAM,OAAO,CAAC,EAClM,QACJ,CACA,IAAMmB,EAAQ,UAAU1B,EAASO,EAAO8E,EAASW,CAAiB,EAC9DC,IAA0B,IAAA,GAM1BX,EAAgBtF,EAASyB,EAAQC,CAAK,GALlCD,EAAO,KAAK,GAAYyE,EAAS,WAAaxE,EAAM,QAAQ,GAC5DuE,EAAsB,MAAMhG,EAAgB,kCAAmC,mBAAmByB,EAAM,SAAS,gBAAiBA,EAAM,SAAU+D,EAAe,WAAY/D,EAAM,QAAQ,CAAC,EAEhMD,EAAO,KAAKC,CAAK,EAIzB,CACA,OAAOD,CACX,CAEA,SAAS,UAAU,EAAwB,EAAkB,EAAwB,EAAoB,GAA8B,CACnI,MAAO,CAAE,KAAM,wBAAyB,SAAUD,EAAM,GAAI,OAAQ1E,EAAmB0E,EAAM,GAAItB,EAAWH,CAAI,EAAGC,EAASgG,CAAiB,EAAG,SAAU9F,EAAWH,CAAI,CAAE,CAC/K"}
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";var ScreenplaySyntaxWalker=class{visitNode(e){}visitApplication(e){this.visitNode(e),e.domain!==null&&this.visitDomain(e.domain),e.timeZone!=null&&this.visitTimeZone(e.timeZone),e.imports.forEach(e=>this.visitImport(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.systems?.forEach(e=>this.visitSystem(e)),e.eventSources?.forEach(e=>this.visitEventSource(e)),e.concepts.forEach(e=>this.visitConcept(e)),e.types.forEach(e=>this.visitType(e)),e.personas.forEach(e=>this.visitPersona(e)),e.policies?.forEach(e=>this.visitPolicy(e)),e.stickyNotes?.forEach(e=>this.visitStickyNote(e)),e.exposures?.forEach(e=>{this.visitNode(e),e.properties.forEach(e=>this.visitNode(e))}),e.instanceContributions?.forEach(e=>{this.visitNode(e),e.contributions.forEach(e=>{this.visitNode(e),e.value!==null&&this.visitExpression(e.value),e.items.forEach(e=>{this.visitNode(e),e.values.forEach(e=>{this.visitNode(e),this.visitExpression(e.value)})})})}),e.identity!=null&&this.visitIdentity(e.identity),e.purposes?.forEach(e=>this.visitPurpose(e)),e.seeds?.forEach(e=>this.visitSeed(e)),e.modules.forEach(e=>this.visitModule(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e))}visitIdentity(e){this.visitNode(e),e.details.forEach(e=>this.visitIdentityDetail(e))}visitIdentityDetail(e){this.visitNode(e),this.visitTypeRef(e.type),this.visitIdentitySource(e.source)}visitIdentitySource(e){switch(e.kind){case`ClaimIdentitySourceSyntax`:this.visitClaimIdentitySource(e);break;case`QueryIdentitySourceSyntax`:this.visitQueryIdentitySource(e);break;case`CodeIdentitySourceSyntax`:this.visitCodeIdentitySource(e);break;case`FileIdentitySourceSyntax`:this.visitFileIdentitySource(e);break;default:this.visitNode(e)}}visitClaimIdentitySource(e){this.visitNode(e)}visitQueryIdentitySource(e){this.visitNode(e),this.visitExpression(e.by)}visitCodeIdentitySource(e){this.visitNode(e),this.visitCodeBlock(e.code)}visitFileIdentitySource(e){this.visitNode(e),this.visitFileReference(e.file)}visitPurpose(e){this.visitNode(e),e.transfers.forEach(e=>this.visitPurposeTransfer(e))}visitPurposeReference(e){this.visitNode(e)}visitPurposeTransfer(e){this.visitNode(e)}visitPolicy(e){this.visitNode(e),e.condition!==null&&this.visitPolicyCondition(e.condition),e.code!==null&&this.visitCodeBlock(e.code),e.file!==null&&this.visitFileReference(e.file)}visitPolicyCondition(e){this.visitNode(e),e.kind===`ClaimConditionSyntax`&&e.matches!==null&&this.visitExpression(e.matches),e.kind===`NotPolicyConditionSyntax`&&this.visitPolicyCondition(e.operand),e.kind===`LogicalPolicyConditionSyntax`&&(this.visitPolicyCondition(e.left),this.visitPolicyCondition(e.right))}visitSeed(e){this.visitNode(e),e.groups.forEach(e=>{this.visitNode(e),e.events.forEach(e=>{this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))})})}visitPersona(e){this.visitNode(e)}visitStickyNote(e){this.visitNode(e)}visitAuthorize(e){this.visitNode(e),this.visitPolicyRequirement(e.requirement)}visitPolicyRequirement(e){this.visitNode(e),e.kind===`LogicalPolicyRequirementSyntax`&&(this.visitPolicyRequirement(e.left),this.visitPolicyRequirement(e.right))}visitDomain(e){this.visitNode(e)}visitImport(e){this.visitNode(e)}visitFileImport(e){this.visitNode(e)}visitGeneration(e){this.visitNode(e),e.file&&this.visitFileReference(e.file),e.code&&this.visitCodeBlock(e.code)}visitConcept(e){this.visitNode(e),e.attributes.forEach(e=>this.visitNode(e)),e.generation&&this.visitGeneration(e.generation),e.validations?.forEach(e=>this.visitValidate(e))}visitType(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e))}visitDependsOn(e){this.visitNode(e)}visitModule(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.dependsOn?.forEach(e=>this.visitDependsOn(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.toolbars?.forEach(e=>this.visitScreenDirective(e)),e.features.forEach(e=>this.visitFeature(e))}visitFeature(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.dependsOn?.forEach(e=>this.visitDependsOn(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.features.forEach(e=>this.visitFeature(e)),e.slices.forEach(e=>this.visitSlice(e)),e.toolbars?.forEach(e=>this.visitScreenDirective(e))}visitSlice(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.commands.forEach(e=>this.visitCommand(e)),e.operations?.forEach(e=>this.visitOperation(e)),e.events.forEach(e=>this.visitEvent(e)),e.constraints.forEach(e=>this.visitConstraint(e)),e.queries.forEach(e=>this.visitQuery(e)),e.projections.forEach(e=>this.visitProjection(e)),e.readModels.forEach(e=>this.visitReadModel(e)),e.captures.forEach(e=>this.visitCapture(e)),e.reactions.forEach(e=>this.visitReaction(e)),e.screens.forEach(e=>this.visitScreen(e)),e.specifications.forEach(e=>this.visitSpecification(e))}visitTriggerData(e){this.visitNode(e),e.type!==null&&this.visitTypeRef(e.type)}visitReads(e){this.visitNode(e),e.byParts?.forEach(e=>this.visitPropertyMapping(e))}visitConcurrency(e){this.visitNode(e)}visitReducer(e){this.visitNode(e),e.from!=null&&this.visitObserverFilter(e.from),e.rules.forEach(e=>this.visitReducerRule(e))}visitReducerRule(e){this.visitNode(e),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitForm(e){this.visitNode(e),e.populate!==null&&this.visitNode(e.populate),e.fields.forEach(e=>this.visitNode(e)),e.columns?.forEach(e=>this.visitNode(e)),e.layout!==null&&e.layout!==void 0&&(this.visitNode(e.layout),e.layout.columns.forEach(e=>{this.visitNode(e),e.width!==null&&this.visitNode(e.width),e.minWidth!==null&&this.visitNode(e.minWidth),e.maxWidth!==null&&this.visitNode(e.maxWidth)}),e.layout.columnGap!==null&&this.visitNode(e.layout.columnGap),e.layout.rowGap!==null&&this.visitNode(e.layout.rowGap),e.layout.placements.forEach(e=>{this.visitNode(e),e.width!==null&&this.visitNode(e.width)})),e.onSubmit!==null&&this.visitScreenDirective(e.onSubmit)}visitTimeZone(e){this.visitNode(e)}visitCommandCalendar(e){this.visitNode(e)}visitSpecificationTimeZone(e){this.visitNode(e)}visitCommand(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.stream!=null&&this.visitCommandStream(e.stream),e.calendar!=null&&this.visitCommandCalendar(e.calendar),e.streamCandidates?.forEach(e=>this.visitCommandStream(e)),e.validations.forEach(e=>this.visitValidate(e)),e.produces.forEach(e=>this.visitProduces(e)),e.handler!=null&&this.visitHandler(e.handler),e.response!=null&&this.visitCommandResponse(e.response)}visitEventSource(e){this.visitNode(e),e.identifier!==null&&this.visitTypeRef(e.identifier),e.streams.forEach(e=>this.visitEventStream(e))}visitEventStream(e){this.visitNode(e),e.streamId!==null&&this.visitTypeRef(e.streamId),e.streamIdParts.forEach(e=>this.visitEventStreamIdPart(e))}visitEventStreamIdPart(e){this.visitNode(e),this.visitTypeRef(e.type)}visitObserverFilter(e){this.visitNode(e)}visitCommandStream(e){this.visitNode(e),e.streamId!==null&&this.visitPropertyMapping(e.streamId),e.streamIdParts.forEach(e=>this.visitPropertyMapping(e)),e.propertyCandidate!==null&&this.visitProperty(e.propertyCandidate)}visitSystem(e){this.visitNode(e)}visitOperation(e){this.visitNode(e),e.inputs.forEach(e=>this.visitProperty(e)),e.execute!==null&&this.visitOperationPhase(e.execute),e.compensate!==null&&this.visitOperationPhase(e.compensate)}visitOperationPhase(e){this.visitNode(e),e.implementation!==null&&this.visitImplementation(e.implementation),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitSpecificationOperationFailure(e){this.visitNode(e)}visitSpecificationCompensated(e){this.visitNode(e)}visitSpecificationOperation(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitHandler(e){this.visitNode(e),e.implementation!=null&&this.visitImplementation(e.implementation),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitImplementation(e){this.visitNode(e),e.hints.forEach(e=>this.visitImplementationHint(e))}visitImplementationHint(e){this.visitNode(e)}visitFileReference(e){this.visitNode(e)}visitCodeBlock(e){this.visitNode(e)}visitCommandResponse(e){e.kind===`ScalarCommandResponseSyntax`?this.visitScalarCommandResponse(e):this.visitRecordCommandResponse(e)}visitScalarCommandResponse(e){this.visitNode(e),this.visitPropertyResponseSource(e.source)}visitRecordCommandResponse(e){this.visitNode(e),e.fields.forEach(e=>this.visitResponseField(e))}visitResponseField(e){this.visitNode(e),e.type!==null&&this.visitTypeRef(e.type),this.visitPropertyResponseSource(e.source)}visitPropertyResponseSource(e){this.visitNode(e)}visitSpecificationReturn(e){e.kind===`ScalarSpecificationReturnSyntax`?this.visitScalarSpecificationReturn(e):this.visitRecordSpecificationReturn(e)}visitScalarSpecificationReturn(e){this.visitNode(e),this.visitExpression(e.value)}visitRecordSpecificationReturn(e){this.visitNode(e),e.fields.forEach(e=>this.visitPropertyMapping(e))}visitValidate(e){this.visitNode(e),e.kind===`DeclarativeValidateSyntax`?(e.rules.forEach(e=>this.visitValidationRule(e)),e.requirements?.forEach(e=>{this.visitNode(e),this.visitCondition(e.condition)})):e.code!=null&&this.visitCodeBlock(e.code)}visitValidationRule(e){this.visitNode(e),e.implementation!=null&&this.visitImplementation(e.implementation),e.value!==null&&this.visitExpression(e.value),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitEvent(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e)),e.tags.forEach(e=>this.visitTag(e))}visitTag(e){this.visitNode(e),this.visitExpression(e.value)}visitReadModel(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e))}visitConstraint(e){this.visitNode(e),e.kind===`FileConstraintSyntax`&&this.visitNode(e.file),e.additionalRules.forEach(e=>this.visitConstraint(e))}visitQuery(e){this.visitNode(e),this.visitTypeRef(e.returnType),e.by!==null&&this.visitQueryParameter(e.by),e.byParts?.forEach(e=>this.visitQueryParameter(e)),e.filters.forEach(e=>this.visitQueryParameter(e)),e.authorize!==null&&this.visitAuthorize(e.authorize)}visitQueryParameter(e){this.visitNode(e),this.visitTypeRef(e.type),e.source!=null&&this.visitExpression(e.source)}visitKey(e){this.visitNode(e),e.kind===`ExpressionKeySyntax`?this.visitExpression(e.expression):e.parts.forEach(e=>{this.visitNode(e),this.visitExpression(e.expression)})}visitProjection(e){this.visitNode(e),e.key!=null&&this.visitKey(e.key),e.blocks.forEach(e=>this.visitProjectionBlock(e))}visitProjectionBlock(e){switch(this.visitNode(e),e.kind){case`FromSyntax`:e.events.forEach(e=>{this.visitNode(e),e.key!=null&&this.visitExpression(e.key)}),e.key!=null&&this.visitKey(e.key),e.parentKey!=null&&this.visitExpression(e.parentKey),e.mappings.forEach(e=>this.visitMapping(e));break;case`EverySyntax`:case`AllSyntax`:e.mappings.forEach(e=>this.visitMapping(e));break;case`JoinSyntax`:e.events.forEach(e=>this.visitJoinEvent(e));break;case`ProjectionVariantSyntax`:e.entersOn.forEach(e=>{this.visitNode(e),e.key!=null&&this.visitExpression(e.key)}),e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`ChildrenSyntax`:e.identifiedBy!==void 0&&this.visitExpression(e.identifiedBy),e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`NestedSyntax`:e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`RemoveWithSyntax`:e.partsKey!=null&&this.visitKey(e.partsKey),e.parentKey!=null&&this.visitExpression(e.parentKey),e.key!=null&&this.visitExpression(e.key);break;case`RemoveViaJoinSyntax`:e.key!=null&&this.visitExpression(e.key)}}visitJoinEvent(e){this.visitNode(e),e.mappings.forEach(e=>this.visitMapping(e))}visitMapping(e){this.visitNode(e),e.source!==void 0&&this.visitExpression(e.source),e.value!==void 0&&this.visitExpression(e.value)}visitCondition(e){this.visitNode(e),e.kind===`ComparisonConditionSyntax`?(e.leftExpression!=null&&this.visitExpression(e.leftExpression),this.visitExpression(e.right)):(this.visitCondition(e.left),this.visitCondition(e.right))}visitReaction(e){this.visitNode(e),e.from!=null&&this.visitObserverFilter(e.from),e.runsAs!=null&&this.visitReactionIdentity(e.runsAs),e.where!=null&&this.visitCondition(e.where),e.triggers.forEach(e=>this.visitReactionTrigger(e))}visitReactionIdentity(e){this.visitNode(e)}visitReactionTrigger(e){this.visitNode(e),this.visitTriggerSource(e.source),e.produces.forEach(e=>this.visitProduces(e)),e.invokes.forEach(e=>this.visitInvokes(e))}visitProduces(e){this.visitNode(e),e.stream!=null&&this.visitCommandStream(e.stream),e.when!=null&&this.visitCondition(e.when),e.inlineEvent!==null&&this.visitEvent(e.inlineEvent),e.inlineOperation!=null&&this.visitOperation(e.inlineOperation),e.for!==null&&this.visitExpression(e.for),e.mappings.forEach(e=>this.visitPropertyMapping(e)),e.tags.forEach(e=>this.visitTag(e))}visitInvokes(e){this.visitNode(e),e.mappings?.forEach(e=>this.visitPropertyMapping(e)),e.onRefused?.forEach(e=>this.visitInvocationRefusal(e))}visitInvocationRefusal(e){this.visitNode(e),e.produces.forEach(e=>this.visitProduces(e))}visitCapture(e){this.visitNode(e),e.source!==null&&this.visitCaptureSource(e.source),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e)),e.children.forEach(e=>this.visitCaptureChildren(e)),e.nested.forEach(e=>this.visitCaptureNested(e))}visitCaptureSource(e){this.visitNode(e),e.settings.forEach(e=>this.visitCaptureSourceSetting(e))}visitCaptureSourceSetting(e){this.visitNode(e)}visitCaptureMap(e){this.visitNode(e),this.visitExpression(e.source),e.kind===`CaptureMapEntrySyntax`&&e.translations.forEach(e=>this.visitNode(e))}visitCaptureAppend(e){this.visitNode(e),e.when!=null&&this.visitNode(e.when),e.mappings?.forEach(e=>this.visitPropertyMapping(e)),e.tags?.forEach(e=>this.visitTag(e))}visitCaptureChildren(e){this.visitNode(e),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e))}visitCaptureNested(e){this.visitNode(e),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e))}visitTriggerSource(e){this.visitNode(e)}visitScreen(e){this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e)),e.contributions?.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))})}visitScreenDirective(e){if(e.kind===`ScreenGuardedActionSyntax`)this.visitScreenGuardedAction(e);else switch(this.visitNode(e),e.kind){case`ScreenDataSyntax`:this.visitTypeRef(e.type);break;case`ScreenActionSyntax`:e.navigate!==null&&this.visitScreenDirective(e.navigate);break;case`ScreenNavigateSyntax`:e.parameters.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)});break;case`ScreenTemplateReferenceSyntax`:e.slots.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))});break;case`ScreenSectionSyntax`:e.directives.forEach(e=>this.visitScreenDirective(e));break;case`ScreenTableSyntax`:e.columns.forEach(e=>this.visitNode(e)),e.rowClick!==null&&this.visitScreenDirective(e.rowClick);break;case`ScreenSummarySyntax`:e.fields.forEach(e=>this.visitNode(e));break;case`ScreenComponentSyntax`:e.context!==null&&this.visitUiBinding(e.context),e.properties.forEach(e=>{this.visitNode(e),e.binding!==null&&this.visitUiBinding(e.binding),e.value!==null&&this.visitExpression(e.value)}),e.exposes.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)}),e.presentation.forEach(e=>this.visitNode(e)),e.outlets.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))});break;case`ScreenToolbarSyntax`:e.items.forEach(e=>{this.visitNode(e),e.parameters.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)}),e.presentation.forEach(e=>this.visitNode(e))}),(e.buttons??[]).forEach(e=>this.visitNode(e));break;case`ScreenCodeSyntax`:this.visitNode(e.code)}}visitScreenGuardedAction(e){this.visitNode(e),e.alternatives.forEach(e=>this.visitScreenActionAlternative(e)),e.otherwise!==null&&this.visitScreenActionOtherwise(e.otherwise),e.navigate!==null&&this.visitScreenDirective(e.navigate)}visitScreenActionAlternative(e){this.visitNode(e),this.visitCondition(e.condition),e.arguments.forEach(e=>this.visitInteractionArgument(e))}visitScreenActionOtherwise(e){this.visitNode(e),e.arguments.forEach(e=>this.visitInteractionArgument(e))}visitInteractionArgument(e){this.visitNode(e)}visitSpecification(e){this.visitNode(e),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.parameters?.forEach(e=>{this.visitNode(e),this.visitTypeRef(e.type)}),e.cases?.forEach(e=>{this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}),e.givenClock!==null&&this.visitSpecificationClock(e.givenClock),e.givenTimeZone!=null&&this.visitSpecificationTimeZone(e.givenTimeZone),e.givenOperationFailures?.forEach(e=>this.visitSpecificationOperationFailure(e)),e.thenOperations?.forEach(e=>this.visitSpecificationOperation(e)),e.thenCompensated?.forEach(e=>this.visitSpecificationCompensated(e)),e.givenCallerPersona!=null&&this.visitNode(e.givenCallerPersona),e.givenCaller!=null&&(this.visitNode(e.givenCaller),e.givenCaller.claims.forEach(e=>this.visitNode(e))),e.given.forEach(e=>this.visitSpecificationEvent(e)),e.givenReadModels.forEach(e=>this.visitSpecificationReadModel(e)),e.when!==null&&this.visitSpecificationCommand(e.when),e.givenCaptures.forEach(e=>this.visitSpecificationCapture(e)),e.givenGenerated?.forEach(e=>this.visitSpecificationGeneratedValue(e)),e.whenAppended!==null&&this.visitSpecificationEvent(e.whenAppended),e.whenRedelivered!=null&&this.visitSpecificationRedelivery(e.whenRedelivered),e.whenClock!==null&&this.visitSpecificationClock(e.whenClock),e.whenTrigger!==null&&this.visitSpecificationTrigger(e.whenTrigger),e.whenCapture!==null&&this.visitSpecificationCapture(e.whenCapture),e.whenQuery!==null&&this.visitSpecificationWhenQuery(e.whenQuery),e.thenEvents.forEach(e=>this.visitSpecificationEvent(e)),e.thenReadModels.forEach(e=>this.visitSpecificationReadModel(e)),e.thenAbsentReadModels?.forEach(e=>{this.visitNode(e),this.visitExpression(e.key)}),e.thenQueries?.forEach(e=>{this.visitNode(e),e.arguments.forEach(e=>this.visitPropertyMapping(e)),e.results.forEach(e=>this.visitSpecificationQueryResult(e))}),e.thenResults.forEach(e=>this.visitSpecificationQueryResult(e)),e.thenNoResult!==null&&this.visitNode(e.thenNoResult),e.thenDenied!=null&&this.visitNode(e.thenDenied),e.thenReturns!=null&&this.visitSpecificationReturn(e.thenReturns),e.thenErrors.forEach(e=>{this.visitNode(e),e.caseValue!=null&&this.visitExpression(e.caseValue)})}visitSpecificationRedelivery(e){this.visitNode(e),e.for!==null&&this.visitExpression(e.for),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationClock(e){this.visitNode(e)}visitSpecificationTrigger(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationGeneratedValue(e){this.visitNode(e),this.visitExpression(e.source)}visitSpecificationCapture(e){this.visitNode(e),e.record.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationWhenQuery(e){this.visitNode(e),e.arguments.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationQueryResult(e){this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationExample(e){this.visitNode(e),e.for!==null&&this.visitExpression(e.for),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e)),e.generatedValues.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationEvent(e){this.visitNode(e),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e)),e.for!==null&&this.visitExpression(e.for)}visitSpecificationStream(e){this.visitNode(e),e.streamId!==null&&this.visitPropertyMapping(e.streamId),e.streamIdParts.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationNoStream(e){this.visitNode(e)}visitSpecificationCommand(e){this.visitNode(e),(e.generatedValues??[]).forEach(e=>this.visitPropertyMapping(e)),e.values.forEach(e=>this.visitPropertyMapping(e)),e.for!==null&&this.visitExpression(e.for)}visitSpecificationReadModel(e){this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))}visitPropertyMapping(e){this.visitNode(e),this.visitExpression(e.source)}visitProperty(e){this.visitNode(e),this.visitTypeRef(e.type)}visitTypeRef(e){this.visitNode(e)}visitUiBinding(e){this.visitNode(e),e.literal!==null&&this.visitExpression(e.literal)}visitIdentityExpression(e){this.visitNode(e)}visitExpression(e){e.kind===`IdentityExpressionSyntax`?this.visitIdentityExpression(e):(this.visitNode(e),e.kind===`ListExpressionSyntax`?e.items.forEach(e=>this.visitExpression(e)):e.kind===`ObjectExpressionSyntax`?e.members.forEach(e=>this.visitObjectMember(e)):e.kind===`DateOfExpressionSyntax`?this.visitExpression(e.operand):e.kind===`TemplateExpressionSyntax`&&e.parts.forEach(e=>{this.visitNode(e),e.kind===`TemplateInterpolationSyntax`&&this.visitExpression(e.expression)}))}visitObjectMember(e){this.visitNode(e),this.visitExpression(e.value)}};export{ScreenplaySyntaxWalker};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";var ScreenplaySyntaxWalker=class{visitNode(e){}visitApplication(e){this.visitNode(e),e.domain!==null&&this.visitDomain(e.domain),e.timeZone!=null&&this.visitTimeZone(e.timeZone),e.imports.forEach(e=>this.visitImport(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.systems?.forEach(e=>this.visitSystem(e)),e.eventSources?.forEach(e=>this.visitEventSource(e)),e.concepts.forEach(e=>this.visitConcept(e)),e.types.forEach(e=>this.visitType(e)),e.personas.forEach(e=>this.visitPersona(e)),e.policies?.forEach(e=>this.visitPolicy(e)),e.stickyNotes?.forEach(e=>this.visitStickyNote(e)),e.exposures?.forEach(e=>{this.visitNode(e),e.properties.forEach(e=>this.visitNode(e))}),e.instanceContributions?.forEach(e=>{this.visitNode(e),e.contributions.forEach(e=>{this.visitNode(e),e.value!==null&&this.visitExpression(e.value),e.items.forEach(e=>{this.visitNode(e),e.values.forEach(e=>{this.visitNode(e),this.visitExpression(e.value)})})})}),e.identity!=null&&this.visitIdentity(e.identity),e.purposes?.forEach(e=>this.visitPurpose(e)),e.seeds?.forEach(e=>this.visitSeed(e)),e.modules.forEach(e=>this.visitModule(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e))}visitIdentity(e){this.visitNode(e),e.details.forEach(e=>this.visitIdentityDetail(e))}visitIdentityDetail(e){this.visitNode(e),this.visitTypeRef(e.type),this.visitIdentitySource(e.source)}visitIdentitySource(e){switch(e.kind){case`ClaimIdentitySourceSyntax`:this.visitClaimIdentitySource(e);break;case`QueryIdentitySourceSyntax`:this.visitQueryIdentitySource(e);break;case`CodeIdentitySourceSyntax`:this.visitCodeIdentitySource(e);break;case`FileIdentitySourceSyntax`:this.visitFileIdentitySource(e);break;default:this.visitNode(e)}}visitClaimIdentitySource(e){this.visitNode(e)}visitQueryIdentitySource(e){this.visitNode(e),this.visitExpression(e.by)}visitCodeIdentitySource(e){this.visitNode(e),this.visitCodeBlock(e.code)}visitFileIdentitySource(e){this.visitNode(e),this.visitFileReference(e.file)}visitPurpose(e){this.visitNode(e),e.transfers.forEach(e=>this.visitPurposeTransfer(e))}visitPurposeReference(e){this.visitNode(e)}visitPurposeTransfer(e){this.visitNode(e)}visitPolicy(e){this.visitNode(e),e.condition!==null&&this.visitPolicyCondition(e.condition),e.code!==null&&this.visitCodeBlock(e.code),e.file!==null&&this.visitFileReference(e.file)}visitPolicyCondition(e){this.visitNode(e),e.kind===`ClaimConditionSyntax`&&e.matches!==null&&this.visitExpression(e.matches),e.kind===`NotPolicyConditionSyntax`&&this.visitPolicyCondition(e.operand),e.kind===`LogicalPolicyConditionSyntax`&&(this.visitPolicyCondition(e.left),this.visitPolicyCondition(e.right))}visitSeed(e){this.visitNode(e),e.groups.forEach(e=>{this.visitNode(e),e.events.forEach(e=>{this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))})})}visitPersona(e){this.visitNode(e)}visitStickyNote(e){this.visitNode(e)}visitAuthorize(e){this.visitNode(e),this.visitPolicyRequirement(e.requirement)}visitPolicyRequirement(e){this.visitNode(e),e.kind===`LogicalPolicyRequirementSyntax`&&(this.visitPolicyRequirement(e.left),this.visitPolicyRequirement(e.right))}visitDomain(e){this.visitNode(e)}visitImport(e){this.visitNode(e)}visitFileImport(e){this.visitNode(e)}visitGeneration(e){this.visitNode(e),e.file&&this.visitFileReference(e.file),e.code&&this.visitCodeBlock(e.code)}visitConcept(e){this.visitNode(e),e.attributes.forEach(e=>this.visitNode(e)),e.generation&&this.visitGeneration(e.generation),e.validations?.forEach(e=>this.visitValidate(e))}visitType(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e))}visitDependsOn(e){this.visitNode(e)}visitModule(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.dependsOn?.forEach(e=>this.visitDependsOn(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.toolbars?.forEach(e=>this.visitScreenDirective(e)),e.features.forEach(e=>this.visitFeature(e))}visitFeature(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.dependsOn?.forEach(e=>this.visitDependsOn(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.features.forEach(e=>this.visitFeature(e)),e.slices.forEach(e=>this.visitSlice(e)),e.toolbars?.forEach(e=>this.visitScreenDirective(e))}visitSlice(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.commands.forEach(e=>this.visitCommand(e)),e.operations?.forEach(e=>this.visitOperation(e)),e.events.forEach(e=>this.visitEvent(e)),e.constraints.forEach(e=>this.visitConstraint(e)),e.queries.forEach(e=>this.visitQuery(e)),e.projections.forEach(e=>this.visitProjection(e)),e.readModels.forEach(e=>this.visitReadModel(e)),e.captures.forEach(e=>this.visitCapture(e)),e.reactions.forEach(e=>this.visitReaction(e)),e.screens.forEach(e=>this.visitScreen(e)),e.specifications.forEach(e=>this.visitSpecification(e))}visitTriggerData(e){this.visitNode(e),e.type!==null&&this.visitTypeRef(e.type)}visitReads(e){this.visitNode(e),e.byParts?.forEach(e=>this.visitPropertyMapping(e))}visitConcurrency(e){this.visitNode(e)}visitReducer(e){this.visitNode(e),e.from!=null&&this.visitObserverFilter(e.from),e.rules.forEach(e=>this.visitReducerRule(e))}visitReducerRule(e){this.visitNode(e),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitForm(e){this.visitNode(e),e.populate!==null&&this.visitNode(e.populate),e.fields.forEach(e=>this.visitNode(e)),e.columns?.forEach(e=>this.visitNode(e)),e.layout!==null&&e.layout!==void 0&&(this.visitNode(e.layout),e.layout.columns.forEach(e=>{this.visitNode(e),e.width!==null&&this.visitNode(e.width),e.minWidth!==null&&this.visitNode(e.minWidth),e.maxWidth!==null&&this.visitNode(e.maxWidth)}),e.layout.columnGap!==null&&this.visitNode(e.layout.columnGap),e.layout.rowGap!==null&&this.visitNode(e.layout.rowGap),e.layout.placements.forEach(e=>{this.visitNode(e),e.width!==null&&this.visitNode(e.width)})),e.onSubmit!==null&&this.visitScreenDirective(e.onSubmit)}visitTimeZone(e){this.visitNode(e)}visitCommandCalendar(e){this.visitNode(e)}visitSpecificationTimeZone(e){this.visitNode(e)}visitCommand(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.stream!=null&&this.visitCommandStream(e.stream),e.calendar!=null&&this.visitCommandCalendar(e.calendar),e.streamCandidates?.forEach(e=>this.visitCommandStream(e)),e.validations.forEach(e=>this.visitValidate(e)),e.produces.forEach(e=>this.visitProduces(e)),e.handler!=null&&this.visitHandler(e.handler),e.response!=null&&this.visitCommandResponse(e.response)}visitEventSource(e){this.visitNode(e),e.identifier!==null&&this.visitTypeRef(e.identifier),e.streams.forEach(e=>this.visitEventStream(e))}visitEventStream(e){this.visitNode(e),e.streamId!==null&&this.visitTypeRef(e.streamId),e.streamIdParts.forEach(e=>this.visitEventStreamIdPart(e))}visitEventStreamIdPart(e){this.visitNode(e),this.visitTypeRef(e.type)}visitObserverFilter(e){this.visitNode(e)}visitCommandStream(e){this.visitNode(e),e.streamId!==null&&this.visitPropertyMapping(e.streamId),e.streamIdParts.forEach(e=>this.visitPropertyMapping(e)),e.propertyCandidate!==null&&this.visitProperty(e.propertyCandidate)}visitSystem(e){this.visitNode(e)}visitOperation(e){this.visitNode(e),e.inputs.forEach(e=>this.visitProperty(e)),e.execute!==null&&this.visitOperationPhase(e.execute),e.compensate!==null&&this.visitOperationPhase(e.compensate)}visitOperationPhase(e){this.visitNode(e),e.implementation!==null&&this.visitImplementation(e.implementation),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitSpecificationOperationFailure(e){this.visitNode(e)}visitSpecificationCompensated(e){this.visitNode(e)}visitSpecificationOperation(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitHandler(e){this.visitNode(e),e.implementation!=null&&this.visitImplementation(e.implementation),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitImplementation(e){this.visitNode(e),e.hints.forEach(e=>this.visitImplementationHint(e))}visitImplementationHint(e){this.visitNode(e)}visitFileReference(e){this.visitNode(e)}visitCodeBlock(e){this.visitNode(e)}visitCommandResponse(e){e.kind===`ScalarCommandResponseSyntax`?this.visitScalarCommandResponse(e):this.visitRecordCommandResponse(e)}visitScalarCommandResponse(e){this.visitNode(e),this.visitPropertyResponseSource(e.source)}visitRecordCommandResponse(e){this.visitNode(e),e.fields.forEach(e=>this.visitResponseField(e))}visitResponseField(e){this.visitNode(e),e.type!==null&&this.visitTypeRef(e.type),this.visitPropertyResponseSource(e.source)}visitPropertyResponseSource(e){this.visitNode(e)}visitSpecificationReturn(e){e.kind===`ScalarSpecificationReturnSyntax`?this.visitScalarSpecificationReturn(e):this.visitRecordSpecificationReturn(e)}visitScalarSpecificationReturn(e){this.visitNode(e),this.visitExpression(e.value)}visitRecordSpecificationReturn(e){this.visitNode(e),e.fields.forEach(e=>this.visitPropertyMapping(e))}visitValidate(e){this.visitNode(e),e.kind===`DeclarativeValidateSyntax`?(e.rules.forEach(e=>this.visitValidationRule(e)),e.requirements?.forEach(e=>{this.visitNode(e),this.visitCondition(e.condition)})):e.code!=null&&this.visitCodeBlock(e.code)}visitValidationRule(e){this.visitNode(e),e.implementation!=null&&this.visitImplementation(e.implementation),e.value!==null&&this.visitExpression(e.value),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitEvent(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e)),e.tags.forEach(e=>this.visitTag(e))}visitTag(e){this.visitNode(e),this.visitExpression(e.value)}visitReadModel(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e))}visitConstraint(e){this.visitNode(e),e.kind===`FileConstraintSyntax`&&this.visitNode(e.file),e.additionalRules.forEach(e=>this.visitConstraint(e))}visitQuery(e){this.visitNode(e),this.visitTypeRef(e.returnType),e.by!==null&&this.visitQueryParameter(e.by),e.byParts?.forEach(e=>this.visitQueryParameter(e)),e.filters.forEach(e=>this.visitQueryParameter(e)),e.authorize!==null&&this.visitAuthorize(e.authorize)}visitQueryParameter(e){this.visitNode(e),this.visitTypeRef(e.type),e.source!=null&&this.visitExpression(e.source)}visitKey(e){this.visitNode(e),e.kind===`ExpressionKeySyntax`?this.visitExpression(e.expression):e.parts.forEach(e=>{this.visitNode(e),this.visitExpression(e.expression)})}visitProjection(e){this.visitNode(e),e.key!=null&&this.visitKey(e.key),e.blocks.forEach(e=>this.visitProjectionBlock(e))}visitProjectionBlock(e){switch(this.visitNode(e),e.kind){case`FromSyntax`:e.events.forEach(e=>{this.visitNode(e),e.key!=null&&this.visitExpression(e.key)}),e.key!=null&&this.visitKey(e.key),e.parentKey!=null&&this.visitExpression(e.parentKey),e.mappings.forEach(e=>this.visitMapping(e));break;case`EverySyntax`:case`AllSyntax`:e.mappings.forEach(e=>this.visitMapping(e));break;case`JoinSyntax`:e.events.forEach(e=>this.visitJoinEvent(e));break;case`ProjectionVariantSyntax`:e.entersOn.forEach(e=>{this.visitNode(e),e.key!=null&&this.visitExpression(e.key)}),e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`ChildrenSyntax`:e.identifiedBy!==void 0&&this.visitExpression(e.identifiedBy),e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`NestedSyntax`:e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`RemoveWithSyntax`:e.partsKey!=null&&this.visitKey(e.partsKey),e.parentKey!=null&&this.visitExpression(e.parentKey),e.key!=null&&this.visitExpression(e.key);break;case`RemoveViaJoinSyntax`:e.key!=null&&this.visitExpression(e.key)}}visitJoinEvent(e){this.visitNode(e),e.mappings.forEach(e=>this.visitMapping(e))}visitMapping(e){this.visitNode(e),e.source!==void 0&&this.visitExpression(e.source),e.value!==void 0&&this.visitExpression(e.value)}visitCondition(e){this.visitNode(e),e.kind===`ComparisonConditionSyntax`?(e.leftExpression!=null&&this.visitExpression(e.leftExpression),this.visitExpression(e.right)):(this.visitCondition(e.left),this.visitCondition(e.right))}visitReaction(e){this.visitNode(e),e.from!=null&&this.visitObserverFilter(e.from),e.runsAs!=null&&this.visitReactionIdentity(e.runsAs),e.where!=null&&this.visitCondition(e.where),e.triggers.forEach(e=>this.visitReactionTrigger(e))}visitReactionIdentity(e){this.visitNode(e)}visitReactionTrigger(e){this.visitNode(e),this.visitTriggerSource(e.source),e.produces.forEach(e=>this.visitProduces(e)),e.invokes.forEach(e=>this.visitInvokes(e))}visitProduces(e){this.visitNode(e),e.stream!=null&&this.visitCommandStream(e.stream),e.when!=null&&this.visitCondition(e.when),e.inlineEvent!==null&&this.visitEvent(e.inlineEvent),e.inlineOperation!=null&&this.visitOperation(e.inlineOperation),e.for!==null&&this.visitExpression(e.for),e.mappings.forEach(e=>this.visitPropertyMapping(e)),e.tags.forEach(e=>this.visitTag(e))}visitInvokes(e){this.visitNode(e),e.mappings?.forEach(e=>this.visitPropertyMapping(e)),e.onRefused?.forEach(e=>this.visitInvocationRefusal(e))}visitInvocationRefusal(e){this.visitNode(e),e.produces.forEach(e=>this.visitProduces(e))}visitCapture(e){this.visitNode(e),e.source!==null&&this.visitCaptureSource(e.source),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e)),e.children.forEach(e=>this.visitCaptureChildren(e)),e.nested.forEach(e=>this.visitCaptureNested(e))}visitCaptureSource(e){this.visitNode(e),e.settings.forEach(e=>this.visitCaptureSourceSetting(e))}visitCaptureSourceSetting(e){this.visitNode(e)}visitCaptureMap(e){this.visitNode(e),this.visitExpression(e.source),e.kind===`CaptureMapEntrySyntax`&&e.translations.forEach(e=>this.visitNode(e))}visitCaptureAppend(e){this.visitNode(e),e.when!=null&&this.visitNode(e.when),e.mappings?.forEach(e=>this.visitPropertyMapping(e)),e.tags?.forEach(e=>this.visitTag(e))}visitCaptureChildren(e){this.visitNode(e),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e))}visitCaptureNested(e){this.visitNode(e),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e))}visitTriggerSource(e){this.visitNode(e)}visitScreen(e){this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e)),e.contributions?.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))})}visitScreenDirective(e){if(e.kind===`ScreenGuardedActionSyntax`)this.visitScreenGuardedAction(e);else switch(this.visitNode(e),e.kind){case`ScreenDataSyntax`:this.visitTypeRef(e.type);break;case`ScreenActionSyntax`:e.navigate!==null&&this.visitScreenDirective(e.navigate);break;case`ScreenNavigateSyntax`:e.parameters.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)});break;case`ScreenTemplateReferenceSyntax`:e.slots.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))});break;case`ScreenSectionSyntax`:e.directives.forEach(e=>this.visitScreenDirective(e));break;case`ScreenTableSyntax`:e.columns.forEach(e=>this.visitNode(e)),e.rowClick!==null&&this.visitScreenDirective(e.rowClick);break;case`ScreenSummarySyntax`:e.fields.forEach(e=>this.visitNode(e));break;case`ScreenComponentSyntax`:e.context!==null&&this.visitUiBinding(e.context),e.properties.forEach(e=>{this.visitNode(e),e.binding!==null&&this.visitUiBinding(e.binding),e.value!==null&&this.visitExpression(e.value)}),e.exposes.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)}),e.presentation.forEach(e=>this.visitNode(e)),e.outlets.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))});break;case`ScreenToolbarSyntax`:e.items.forEach(e=>{this.visitNode(e),e.parameters.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)}),e.presentation.forEach(e=>this.visitNode(e))}),(e.buttons??[]).forEach(e=>this.visitNode(e));break;case`ScreenCodeSyntax`:this.visitNode(e.code)}}visitScreenGuardedAction(e){this.visitNode(e),e.alternatives.forEach(e=>this.visitScreenActionAlternative(e)),e.otherwise!==null&&this.visitScreenActionOtherwise(e.otherwise),e.navigate!==null&&this.visitScreenDirective(e.navigate)}visitScreenActionAlternative(e){this.visitNode(e),this.visitCondition(e.condition),e.arguments.forEach(e=>this.visitInteractionArgument(e))}visitScreenActionOtherwise(e){this.visitNode(e),e.arguments.forEach(e=>this.visitInteractionArgument(e))}visitInteractionArgument(e){this.visitNode(e)}visitSpecification(e){this.visitNode(e),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.parameters?.forEach(e=>{this.visitNode(e),this.visitTypeRef(e.type)}),e.cases?.forEach(e=>{this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}),e.givenClock!==null&&this.visitSpecificationClock(e.givenClock),e.givenTimeZone!=null&&this.visitSpecificationTimeZone(e.givenTimeZone),e.givenOperationFailures?.forEach(e=>this.visitSpecificationOperationFailure(e)),e.thenOperations?.forEach(e=>this.visitSpecificationOperation(e)),e.thenCompensated?.forEach(e=>this.visitSpecificationCompensated(e)),e.givenCallerPersona!=null&&this.visitNode(e.givenCallerPersona),e.givenCaller!=null&&(this.visitNode(e.givenCaller),e.givenCaller.claims.forEach(e=>this.visitNode(e))),e.given.forEach(e=>this.visitSpecificationEvent(e)),e.givenReadModels.forEach(e=>this.visitSpecificationReadModel(e)),e.when!==null&&this.visitSpecificationCommand(e.when),e.givenCaptures.forEach(e=>this.visitSpecificationCapture(e)),e.givenGenerated?.forEach(e=>this.visitSpecificationGeneratedValue(e)),e.whenAppended!==null&&this.visitSpecificationEvent(e.whenAppended),e.whenRedelivered!=null&&this.visitSpecificationRedelivery(e.whenRedelivered),e.whenClock!==null&&this.visitSpecificationClock(e.whenClock),e.whenTrigger!==null&&this.visitSpecificationTrigger(e.whenTrigger),e.whenCapture!==null&&this.visitSpecificationCapture(e.whenCapture),e.whenQuery!==null&&this.visitSpecificationWhenQuery(e.whenQuery),e.thenEvents.forEach(e=>this.visitSpecificationEvent(e)),e.thenReadModels.forEach(e=>this.visitSpecificationReadModel(e)),e.thenAbsentReadModels?.forEach(e=>{this.visitNode(e),this.visitExpression(e.key)}),e.thenQueries?.forEach(e=>{this.visitNode(e),e.arguments.forEach(e=>this.visitPropertyMapping(e)),e.results.forEach(e=>this.visitSpecificationQueryResult(e))}),e.thenResults.forEach(e=>this.visitSpecificationQueryResult(e)),e.thenNoResult!==null&&this.visitNode(e.thenNoResult),e.thenDenied!=null&&this.visitNode(e.thenDenied),e.thenReturns!=null&&this.visitSpecificationReturn(e.thenReturns),e.thenErrors.forEach(e=>{this.visitNode(e),e.caseValue!=null&&this.visitExpression(e.caseValue)}),e.thenInvocations?.forEach(e=>this.visitSpecificationInvocation(e))}visitSpecificationInvocation(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationRedelivery(e){this.visitNode(e),e.for!==null&&this.visitExpression(e.for),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationClock(e){this.visitNode(e)}visitSpecificationTrigger(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationGeneratedValue(e){this.visitNode(e),this.visitExpression(e.source)}visitSpecificationCapture(e){this.visitNode(e),e.record.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationWhenQuery(e){this.visitNode(e),e.arguments.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationQueryResult(e){this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationExample(e){this.visitNode(e),e.for!==null&&this.visitExpression(e.for),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e)),e.generatedValues.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationEvent(e){this.visitNode(e),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e)),e.for!==null&&this.visitExpression(e.for)}visitSpecificationStream(e){this.visitNode(e),e.streamId!==null&&this.visitPropertyMapping(e.streamId),e.streamIdParts.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationNoStream(e){this.visitNode(e)}visitSpecificationCommand(e){this.visitNode(e),(e.generatedValues??[]).forEach(e=>this.visitPropertyMapping(e)),e.values.forEach(e=>this.visitPropertyMapping(e)),e.for!==null&&this.visitExpression(e.for)}visitSpecificationReadModel(e){this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))}visitPropertyMapping(e){this.visitNode(e),this.visitExpression(e.source)}visitProperty(e){this.visitNode(e),this.visitTypeRef(e.type)}visitTypeRef(e){this.visitNode(e)}visitUiBinding(e){this.visitNode(e),e.literal!==null&&this.visitExpression(e.literal)}visitIdentityExpression(e){this.visitNode(e)}visitExpression(e){e.kind===`IdentityExpressionSyntax`?this.visitIdentityExpression(e):(this.visitNode(e),e.kind===`ListExpressionSyntax`?e.items.forEach(e=>this.visitExpression(e)):e.kind===`ObjectExpressionSyntax`?e.members.forEach(e=>this.visitObjectMember(e)):e.kind===`DateOfExpressionSyntax`?this.visitExpression(e.operand):e.kind===`TemplateExpressionSyntax`&&e.parts.forEach(e=>{this.visitNode(e),e.kind===`TemplateInterpolationSyntax`&&this.visitExpression(e.expression)}))}visitObjectMember(e){this.visitNode(e),this.visitExpression(e.value)}};export{ScreenplaySyntaxWalker};
2
2
  //# sourceMappingURL=ScreenplaySyntaxWalker.js.map