{"version":3,"file":"declarations-DR6To8_k.mjs","names":["#state","#segmentBefore","#segmentAfter","#separatorCount"],"sources":["../src/syntax/red.ts","../src/syntax/ast-helpers.ts","../src/syntax/ast/identifier.ts","../src/syntax/ast/qualified-name.ts","../src/syntax/ast/expressions.ts","../src/syntax/ast/attributes.ts","../src/syntax/ast/type-annotation.ts","../src/syntax/ast/declarations.ts"],"sourcesContent":["import type { Token, TokenKind } from '../tokenizer';\nimport type { GreenElement, GreenNode, GreenToken } from './green';\nimport type { SyntaxKind } from './syntax-kind';\n\n/**\n * A token in the red tree. Unlike the green-layer {@link Token} (kind + text\n * only), a red token also carries its absolute `offset` within the source and a\n * link back to its `parent` {@link SyntaxNode}, so a cursor anchored on a token\n * can walk outward (parent, previous/next token, siblings) without re-scanning\n * from the document root.\n */\nexport class SyntaxToken implements Token {\n  readonly green: GreenToken;\n  readonly kind: TokenKind;\n  readonly text: string;\n  readonly offset: number;\n  readonly parent: SyntaxNode;\n  /** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */\n  readonly index: number;\n\n  constructor(green: GreenToken, offset: number, parent: SyntaxNode, index: number) {\n    this.green = green;\n    this.kind = green.kind;\n    this.text = green.text;\n    this.offset = offset;\n    this.parent = parent;\n    this.index = index;\n  }\n\n  get textLength(): number {\n    return this.text.length;\n  }\n\n  get endOffset(): number {\n    return this.offset + this.textLength;\n  }\n\n  /** Whether `offset` falls within this token, inclusive of both ends. */\n  isInside(offset: number): boolean {\n    return offset >= this.offset && offset <= this.endOffset;\n  }\n\n  isOutside(offset: number): boolean {\n    return !this.isInside(offset);\n  }\n\n  /** The sibling element immediately after this token within its parent. */\n  get nextSiblingOrToken(): SyntaxElement | undefined {\n    return childAt(this.parent, this.index + 1);\n  }\n\n  /** The sibling element immediately before this token within its parent. */\n  get prevSiblingOrToken(): SyntaxElement | undefined {\n    return childAt(this.parent, this.index - 1);\n  }\n\n  /** The next token in document order, crossing node boundaries. */\n  get nextToken(): SyntaxToken | undefined {\n    for (let el = climbingNext(this); el !== undefined; el = climbingNext(el)) {\n      const token = firstToken(el);\n      if (token !== undefined) return token;\n    }\n    return undefined;\n  }\n\n  /** The previous token in document order, crossing node boundaries. */\n  get prevToken(): SyntaxToken | undefined {\n    for (let el = climbingPrev(this); el !== undefined; el = climbingPrev(el)) {\n      const token = lastToken(el);\n      if (token !== undefined) return token;\n    }\n    return undefined;\n  }\n}\n\nexport type SyntaxElement = SyntaxNode | SyntaxToken;\n\n/**\n * The result of {@link SyntaxNode.tokenAtOffset}: an offset can fall outside\n * every token (`none`), strictly inside a single token (`single`), or exactly on\n * the seam between two adjacent tokens (`between`). `leftBiased` / `rightBiased`\n * collapse the seam case to one side; for `single` both return the same token,\n * for `none` both return `undefined`.\n */\ntype TokenAtOffsetState =\n  | { readonly kind: 'none' }\n  | { readonly kind: 'single'; readonly token: SyntaxToken }\n  | { readonly kind: 'between'; readonly left: SyntaxToken; readonly right: SyntaxToken };\n\nexport class TokenAtOffset {\n  readonly #state: TokenAtOffsetState;\n\n  private constructor(state: TokenAtOffsetState) {\n    this.#state = state;\n  }\n\n  static none(): TokenAtOffset {\n    return new TokenAtOffset({ kind: 'none' });\n  }\n\n  static single(token: SyntaxToken): TokenAtOffset {\n    return new TokenAtOffset({ kind: 'single', token });\n  }\n\n  static between(left: SyntaxToken, right: SyntaxToken): TokenAtOffset {\n    return new TokenAtOffset({ kind: 'between', left, right });\n  }\n\n  get isEmpty(): boolean {\n    return this.#state.kind === 'none';\n  }\n\n  get isBetween(): boolean {\n    return this.#state.kind === 'between';\n  }\n\n  leftBiased(): SyntaxToken | undefined {\n    switch (this.#state.kind) {\n      case 'none':\n        return undefined;\n      case 'single':\n        return this.#state.token;\n      case 'between':\n        return this.#state.left;\n    }\n  }\n\n  rightBiased(): SyntaxToken | undefined {\n    switch (this.#state.kind) {\n      case 'none':\n        return undefined;\n      case 'single':\n        return this.#state.token;\n      case 'between':\n        return this.#state.right;\n    }\n  }\n}\n\nexport class SyntaxNode {\n  readonly green: GreenNode;\n  readonly offset: number;\n  readonly parent: SyntaxNode | undefined;\n  /** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */\n  readonly index: number;\n\n  constructor(green: GreenNode, offset: number, parent: SyntaxNode | undefined, index: number) {\n    this.green = green;\n    this.offset = offset;\n    this.parent = parent;\n    this.index = index;\n  }\n\n  get kind(): SyntaxKind {\n    return this.green.kind;\n  }\n\n  get textLength(): number {\n    return this.green.textLength;\n  }\n\n  get endOffset(): number {\n    return this.offset + this.textLength;\n  }\n\n  /** Whether `offset` falls within this node, inclusive of both ends. */\n  isInside(offset: number): boolean {\n    return offset >= this.offset && offset <= this.endOffset;\n  }\n\n  isOutside(offset: number): boolean {\n    return !this.isInside(offset);\n  }\n\n  get firstChild(): SyntaxElement | undefined {\n    return childAt(this, 0);\n  }\n\n  get lastChild(): SyntaxElement | undefined {\n    const len = this.green.children.length;\n    if (len === 0) return undefined;\n    return childAt(this, len - 1);\n  }\n\n  get nextSibling(): SyntaxElement | undefined {\n    return this.parent === undefined ? undefined : childAt(this.parent, this.index + 1);\n  }\n\n  get prevSibling(): SyntaxElement | undefined {\n    return this.parent === undefined ? undefined : childAt(this.parent, this.index - 1);\n  }\n\n  /** The sibling element immediately after this node within its parent. */\n  get nextSiblingOrToken(): SyntaxElement | undefined {\n    return this.nextSibling;\n  }\n\n  /** The sibling element immediately before this node within its parent. */\n  get prevSiblingOrToken(): SyntaxElement | undefined {\n    return this.prevSibling;\n  }\n\n  /** The first token in this subtree (depth-first), or `undefined` if empty. */\n  get firstToken(): SyntaxToken | undefined {\n    return firstToken(this);\n  }\n\n  /** The last token in this subtree (depth-first), or `undefined` if empty. */\n  get lastToken(): SyntaxToken | undefined {\n    return lastToken(this);\n  }\n\n  *children(): Iterable<SyntaxElement> {\n    let offset = this.offset;\n    let index = 0;\n    for (const child of this.green.children) {\n      yield wrapElement(child, offset, this, index);\n      offset += elementTextLength(child);\n      index++;\n    }\n  }\n\n  *childNodes(): Iterable<SyntaxNode> {\n    for (const child of this.children()) {\n      if (child instanceof SyntaxNode) yield child;\n    }\n  }\n\n  *ancestors(): Iterable<SyntaxNode> {\n    let current: SyntaxNode | undefined = this.parent;\n    while (current) {\n      yield current;\n      current = current.parent;\n    }\n  }\n\n  /** The nearest match, testing this node itself before walking its ancestors. */\n  findAncestor<T>(cast: (node: SyntaxNode) => T | undefined): T | undefined {\n    const self = cast(this);\n    if (self !== undefined) {\n      return self;\n    }\n    for (const ancestor of this.ancestors()) {\n      const result = cast(ancestor);\n      if (result !== undefined) {\n        return result;\n      }\n    }\n    return undefined;\n  }\n\n  *descendants(): Iterable<SyntaxElement> {\n    const stack: SyntaxElement[] = [this];\n    for (let el = stack.pop(); el !== undefined; el = stack.pop()) {\n      yield el;\n      if (el instanceof SyntaxNode) {\n        const children = Array.from(el.children());\n        for (let i = children.length - 1; i >= 0; i--) {\n          const child = children[i];\n          if (child !== undefined) {\n            stack.push(child);\n          }\n        }\n      }\n    }\n  }\n\n  *tokens(): Iterable<SyntaxToken> {\n    for (const el of this.descendants()) {\n      if (el instanceof SyntaxToken) {\n        yield el;\n      }\n    }\n  }\n\n  /**\n   * The token(s) at `offset`. The between-two-tokens case (offset exactly on a\n   * token seam) is represented explicitly so callers can left/right bias.\n   */\n  tokenAtOffset(offset: number): TokenAtOffset {\n    return tokenAtOffsetOf(this, offset);\n  }\n\n  /**\n   * The smallest element fully containing the range `[start, end]`. At a seam\n   * (and for empty ranges) the left-hand element is preferred, matching\n   * {@link containsOffset}'s inclusive span.\n   */\n  coveringElement(start: number, end: number): SyntaxElement {\n    let result: SyntaxElement = this;\n    for (;;) {\n      if (result instanceof SyntaxToken) return result;\n      let next: SyntaxElement | undefined;\n      for (const child of result.children()) {\n        if (containsRange(child, start, end)) {\n          next = child;\n          break;\n        }\n      }\n      if (next === undefined) return result;\n      result = next;\n    }\n  }\n}\n\nfunction elementTextLength(el: GreenElement): number {\n  return el.type === 'token' ? el.text.length : el.textLength;\n}\n\nfunction elementLength(el: SyntaxElement): number {\n  return el instanceof SyntaxToken ? el.text.length : el.textLength;\n}\n\n/**\n * Whether `el` contains `offset`. The span is inclusive on both ends so a seam\n * offset touches both neighbours.\n */\nfunction containsOffset(el: SyntaxElement, offset: number): boolean {\n  const start = el.offset;\n  const len = elementLength(el);\n  return offset >= start && offset <= start + len;\n}\n\nfunction containsRange(el: SyntaxElement, start: number, end: number): boolean {\n  const elStart = el.offset;\n  const len = elementLength(el);\n  return elStart <= start && end <= elStart + len;\n}\n\nfunction tokenAtOffsetOf(el: SyntaxElement, offset: number): TokenAtOffset {\n  if (el instanceof SyntaxToken) {\n    return TokenAtOffset.single(el);\n  }\n  let left: SyntaxElement | undefined;\n  let right: SyntaxElement | undefined;\n  for (const child of el.children()) {\n    if (!containsOffset(child, offset)) continue;\n    if (left === undefined) {\n      left = child;\n    } else {\n      right = child;\n      break;\n    }\n  }\n  if (left === undefined) return TokenAtOffset.none();\n  if (right === undefined) return tokenAtOffsetOf(left, offset);\n  const leftToken = tokenAtOffsetOf(left, offset).rightBiased();\n  const rightToken = tokenAtOffsetOf(right, offset).leftBiased();\n  if (leftToken !== undefined && rightToken !== undefined) {\n    return TokenAtOffset.between(leftToken, rightToken);\n  }\n  if (leftToken !== undefined) return TokenAtOffset.single(leftToken);\n  if (rightToken !== undefined) return TokenAtOffset.single(rightToken);\n  return TokenAtOffset.none();\n}\n\nfunction firstToken(el: SyntaxElement): SyntaxToken | undefined {\n  if (el instanceof SyntaxToken) return el;\n  for (const child of el.children()) {\n    const token = firstToken(child);\n    if (token !== undefined) return token;\n  }\n  return undefined;\n}\n\nfunction lastToken(el: SyntaxElement): SyntaxToken | undefined {\n  if (el instanceof SyntaxToken) return el;\n  const children = Array.from(el.children());\n  for (let i = children.length - 1; i >= 0; i--) {\n    const child = children[i];\n    if (child !== undefined) {\n      const token = lastToken(child);\n      if (token !== undefined) return token;\n    }\n  }\n  return undefined;\n}\n\nfunction climbingNext(el: SyntaxElement): SyntaxElement | undefined {\n  let current: SyntaxElement = el;\n  for (;;) {\n    const parent = current.parent;\n    if (parent === undefined) return undefined;\n    const sibling = childAt(parent, current.index + 1);\n    if (sibling !== undefined) return sibling;\n    current = parent;\n  }\n}\n\nfunction climbingPrev(el: SyntaxElement): SyntaxElement | undefined {\n  let current: SyntaxElement = el;\n  for (;;) {\n    const parent = current.parent;\n    if (parent === undefined) return undefined;\n    const sibling = childAt(parent, current.index - 1);\n    if (sibling !== undefined) return sibling;\n    current = parent;\n  }\n}\n\nfunction wrapElement(\n  green: GreenElement,\n  offset: number,\n  parent: SyntaxNode,\n  index: number,\n): SyntaxElement {\n  if (green.type === 'token') {\n    return new SyntaxToken(green, offset, parent, index);\n  }\n  return new SyntaxNode(green, offset, parent, index);\n}\n\nfunction childAt(node: SyntaxNode, index: number): SyntaxElement | undefined {\n  const children = node.green.children;\n  const target = children[index];\n  if (target === undefined) return undefined;\n  let offset = node.offset;\n  for (let i = 0; i < index; i++) {\n    const child = children[i];\n    if (child !== undefined) {\n      offset += elementTextLength(child);\n    }\n  }\n  return wrapElement(target, offset, node, index);\n}\n\nexport function createSyntaxTree(green: GreenNode): SyntaxNode {\n  return new SyntaxNode(green, 0, undefined, 0);\n}\n","import type { TokenKind } from '../tokenizer';\nimport { SyntaxNode, type SyntaxToken } from './red';\n\nexport interface AstNode {\n  readonly syntax: SyntaxNode;\n}\n\nexport interface BracedBlock extends AstNode {\n  lbrace(): SyntaxToken | undefined;\n  rbrace(): SyntaxToken | undefined;\n}\n\nexport function findChildToken(node: SyntaxNode, kind: TokenKind): SyntaxToken | undefined {\n  for (const child of node.children()) {\n    if (!(child instanceof SyntaxNode) && child.kind === kind) {\n      return child;\n    }\n  }\n  return undefined;\n}\n\nexport function findFirstChild<T>(\n  node: SyntaxNode,\n  cast: (node: SyntaxNode) => T | undefined,\n): T | undefined {\n  for (const child of node.childNodes()) {\n    const result = cast(child);\n    if (result !== undefined) return result;\n  }\n  return undefined;\n}\n\nexport function* filterChildren<T>(\n  node: SyntaxNode,\n  cast: (node: SyntaxNode) => T | undefined,\n): Iterable<T> {\n  for (const child of node.childNodes()) {\n    const result = cast(child);\n    if (result !== undefined) yield result;\n  }\n}\n\ntype CastTarget<C> = C extends (node: SyntaxNode) => infer R ? Exclude<R, undefined> : never;\n\nexport function any<Casts extends readonly ((node: SyntaxNode) => unknown)[]>(\n  ...casts: Casts\n): (node: SyntaxNode) => CastTarget<Casts[number]> | undefined;\nexport function any(\n  ...casts: ReadonlyArray<(node: SyntaxNode) => unknown>\n): (node: SyntaxNode) => unknown {\n  return (node) => {\n    for (const cast of casts) {\n      const result = cast(node);\n      if (result !== undefined) {\n        return result;\n      }\n    }\n    return undefined;\n  };\n}\n\n/**\n * Raw source text of a CST node, verbatim (quotes and brackets preserved). For\n * the decoded value of a string literal, decode it instead.\n */\nexport function printSyntax(node: SyntaxNode): string {\n  let text = '';\n  for (const token of node.tokens()) {\n    text += token.text;\n  }\n  return text;\n}\n","import type { AstNode } from '../ast-helpers';\nimport { findChildToken } from '../ast-helpers';\nimport type { SyntaxNode, SyntaxToken } from '../red';\n\nexport class IdentifierAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  token(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Ident');\n  }\n\n  name(): string | undefined {\n    return this.token()?.text;\n  }\n\n  static cast(node: SyntaxNode): IdentifierAst | undefined {\n    return node.kind === 'Identifier' ? new IdentifierAst(node) : undefined;\n  }\n}\n","import type { AstNode } from '../ast-helpers';\nimport { filterChildren, findChildToken, findFirstChild } from '../ast-helpers';\nimport { SyntaxNode, type SyntaxToken } from '../red';\nimport { IdentifierAst } from './identifier';\n\n/** A namespace-qualified name, e.g. `pgvector.Vector` or `supabase:auth.User`. */\nexport class QualifiedNameAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  #segmentBefore(boundary: number): IdentifierAst | undefined {\n    let found: IdentifierAst | undefined;\n    for (const segment of filterChildren(this.syntax, IdentifierAst.cast)) {\n      if (segment.syntax.offset >= boundary) break;\n      found = segment;\n    }\n    return found;\n  }\n\n  #segmentAfter(boundary: number): IdentifierAst | undefined {\n    for (const segment of filterChildren(this.syntax, IdentifierAst.cast)) {\n      if (segment.syntax.offset > boundary) return segment;\n    }\n    return undefined;\n  }\n\n  #separatorCount(kind: 'Dot' | 'Colon'): number {\n    let count = 0;\n    for (const child of this.syntax.children()) {\n      if (!(child instanceof SyntaxNode) && child.kind === kind) count++;\n    }\n    return count;\n  }\n\n  colon(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Colon');\n  }\n\n  dot(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Dot');\n  }\n\n  space(): IdentifierAst | undefined {\n    const colon = this.colon();\n    if (!colon) return undefined;\n    return this.#segmentBefore(colon.offset);\n  }\n\n  namespace(): IdentifierAst | undefined {\n    const dot = this.dot();\n    if (!dot) return undefined;\n    return this.#segmentBefore(dot.offset);\n  }\n\n  identifier(): IdentifierAst | undefined {\n    const dot = this.dot();\n    if (dot) return this.#segmentAfter(dot.offset);\n    const colon = this.colon();\n    if (colon) return this.#segmentAfter(colon.offset);\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  /**\n   * Every identifier segment, in source order. A bare `Vector` yields\n   * `['Vector']`; a qualified `pgvector.Vector` yields `['pgvector', 'Vector']`.\n   */\n  path(): readonly string[] {\n    const segments: string[] = [];\n    for (const segment of filterChildren(this.syntax, IdentifierAst.cast)) {\n      const text = segment.token()?.text;\n      if (text !== undefined) segments.push(text);\n    }\n    return segments;\n  }\n\n  /** True iff this is a single unqualified identifier whose text equals `name`. */\n  isSimpleName(name: string): boolean {\n    if (this.dot() !== undefined || this.colon() !== undefined) return false;\n    return this.identifier()?.token()?.text === name;\n  }\n\n  /**\n   * Flags a malformed name with more qualifier segments than allowed (a second\n   * `:`-space or a second `.`-namespace).\n   */\n  isOverQualified(): boolean {\n    return this.#separatorCount('Dot') > 1 || this.#separatorCount('Colon') > 1;\n  }\n\n  static cast(node: SyntaxNode): QualifiedNameAst | undefined {\n    return node.kind === 'QualifiedName' ? new QualifiedNameAst(node) : undefined;\n  }\n}\n","import type { AstNode } from '../ast-helpers';\nimport { filterChildren, findChildToken, findFirstChild } from '../ast-helpers';\nimport { SyntaxNode, type SyntaxToken } from '../red';\nimport { IdentifierAst } from './identifier';\nimport { QualifiedNameAst } from './qualified-name';\n\nexport class FunctionCallAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  /** The qualified-name callee, or `undefined` when identifier segments sit directly under the node. */\n  name(): QualifiedNameAst | undefined {\n    return findFirstChild(this.syntax, QualifiedNameAst.cast);\n  }\n\n  /**\n   * The dotted call path, in source order. A bare `Vector(…)` yields\n   * `['Vector']`; a namespace-qualified `pgvector.Vector(…)` yields\n   * `['pgvector', 'Vector']`. Empty when the call carries no identifier.\n   */\n  path(): readonly string[] {\n    const qualified = this.name();\n    const segments: string[] = [];\n    for (const segment of filterChildren(qualified?.syntax ?? this.syntax, IdentifierAst.cast)) {\n      const text = segment.token()?.text;\n      if (text !== undefined) segments.push(text);\n    }\n    return segments;\n  }\n\n  lparen(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LParen');\n  }\n\n  rparen(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RParen');\n  }\n\n  *args(): Iterable<AttributeArgAst> {\n    yield* filterChildren(this.syntax, AttributeArgAst.cast);\n  }\n\n  static cast(node: SyntaxNode): FunctionCallAst | undefined {\n    return node.kind === 'FunctionCall' ? new FunctionCallAst(node) : undefined;\n  }\n}\n\nexport class ArrayLiteralAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  lbracket(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LBracket');\n  }\n\n  rbracket(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RBracket');\n  }\n\n  *elements(): Iterable<ExpressionAst> {\n    yield* filterChildren(this.syntax, castExpression);\n  }\n\n  static cast(node: SyntaxNode): ArrayLiteralAst | undefined {\n    return node.kind === 'ArrayLiteral' ? new ArrayLiteralAst(node) : undefined;\n  }\n}\n\nconst HEX = /^[0-9a-fA-F]+$/;\n\nfunction decodeFixedHex(raw: string, start: number, width: number): string | undefined {\n  if (start + width > raw.length) return undefined;\n  const hex = raw.slice(start, start + width);\n  if (!HEX.test(hex)) return undefined;\n  return String.fromCharCode(Number.parseInt(hex, 16));\n}\n\nfunction decodeStringLiteral(raw: string): string {\n  let out = '';\n  let i = 0;\n  while (i < raw.length) {\n    const ch = raw.charAt(i);\n    if (ch !== '\\\\' || i + 1 >= raw.length) {\n      out += ch;\n      i++;\n      continue;\n    }\n    const next = raw.charAt(i + 1);\n    switch (next) {\n      case 'n':\n        out += '\\n';\n        i += 2;\n        continue;\n      case 'r':\n        out += '\\r';\n        i += 2;\n        continue;\n      case 't':\n        out += '\\t';\n        i += 2;\n        continue;\n      case '\"':\n        out += '\"';\n        i += 2;\n        continue;\n      case \"'\":\n        out += \"'\";\n        i += 2;\n        continue;\n      case '\\\\':\n        out += '\\\\';\n        i += 2;\n        continue;\n      case 'x': {\n        const decoded = decodeFixedHex(raw, i + 2, 2);\n        if (decoded === undefined) {\n          out += '\\\\x';\n          i += 2;\n          continue;\n        }\n        out += decoded;\n        i += 4;\n        continue;\n      }\n      case 'u': {\n        const decoded = decodeFixedHex(raw, i + 2, 4);\n        if (decoded === undefined) {\n          out += '\\\\u';\n          i += 2;\n          continue;\n        }\n        out += decoded;\n        i += 6;\n        continue;\n      }\n      default:\n        out += `\\\\${next}`;\n        i += 2;\n        continue;\n    }\n  }\n  return out;\n}\n\nexport class StringLiteralExprAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  token(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'StringLiteral');\n  }\n\n  value(): string | undefined {\n    const tok = this.token();\n    if (!tok) return undefined;\n    return decodeStringLiteral(tok.text.slice(1, -1));\n  }\n\n  static cast(node: SyntaxNode): StringLiteralExprAst | undefined {\n    return node.kind === 'StringLiteralExpr' ? new StringLiteralExprAst(node) : undefined;\n  }\n}\n\nexport class NumberLiteralExprAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  token(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'NumberLiteral');\n  }\n\n  value(): number | undefined {\n    const tok = this.token();\n    if (!tok) return undefined;\n    return Number(tok.text);\n  }\n\n  static cast(node: SyntaxNode): NumberLiteralExprAst | undefined {\n    return node.kind === 'NumberLiteralExpr' ? new NumberLiteralExprAst(node) : undefined;\n  }\n}\n\nexport class BooleanLiteralExprAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  token(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Ident');\n  }\n\n  value(): boolean | undefined {\n    const tok = this.token();\n    if (!tok) return undefined;\n    if (tok.text === 'true') return true;\n    if (tok.text === 'false') return false;\n    return undefined;\n  }\n\n  static cast(node: SyntaxNode): BooleanLiteralExprAst | undefined {\n    return node.kind === 'BooleanLiteralExpr' ? new BooleanLiteralExprAst(node) : undefined;\n  }\n}\n\nexport class ObjectLiteralExprAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  lbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LBrace');\n  }\n\n  rbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RBrace');\n  }\n\n  *fields(): Iterable<ObjectFieldAst> {\n    yield* filterChildren(this.syntax, ObjectFieldAst.cast);\n  }\n\n  static cast(node: SyntaxNode): ObjectLiteralExprAst | undefined {\n    return node.kind === 'ObjectLiteralExpr' ? new ObjectLiteralExprAst(node) : undefined;\n  }\n}\n\nexport class ObjectFieldAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  key(): IdentifierAst | undefined {\n    for (const child of this.syntax.children()) {\n      if (!(child instanceof SyntaxNode)) {\n        if (child.kind === 'Colon') break;\n        continue;\n      }\n      return IdentifierAst.cast(child);\n    }\n    return undefined;\n  }\n\n  /**\n   * The field's logical key name, unquoted. An identifier key (`length:`) yields\n   * its text; a string-literal key (`\"length\":`) yields the decoded string.\n   * `undefined` when the field carries no key node.\n   */\n  keyName(): string | undefined {\n    for (const child of this.syntax.children()) {\n      if (!(child instanceof SyntaxNode)) {\n        if (child.kind === 'Colon') break;\n        continue;\n      }\n      const identifier = IdentifierAst.cast(child);\n      if (identifier) return identifier.token()?.text;\n      const stringKey = StringLiteralExprAst.cast(child);\n      if (stringKey) return stringKey.value();\n      return undefined;\n    }\n    return undefined;\n  }\n\n  colon(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Colon');\n  }\n\n  value(): ExpressionAst | undefined {\n    if (this.colon()) {\n      let pastColon = false;\n      for (const child of this.syntax.children()) {\n        if (!(child instanceof SyntaxNode)) {\n          if (child.kind === 'Colon') pastColon = true;\n          continue;\n        }\n        if (pastColon) {\n          const expr = castExpression(child);\n          if (expr) return expr;\n        }\n      }\n      return undefined;\n    }\n    return findFirstChild(this.syntax, castExpression);\n  }\n\n  static cast(node: SyntaxNode): ObjectFieldAst | undefined {\n    return node.kind === 'ObjectField' ? new ObjectFieldAst(node) : undefined;\n  }\n}\n\nexport type ExpressionAst =\n  | FunctionCallAst\n  | ArrayLiteralAst\n  | StringLiteralExprAst\n  | NumberLiteralExprAst\n  | BooleanLiteralExprAst\n  | ObjectLiteralExprAst\n  | IdentifierAst;\n\nexport function castExpression(node: SyntaxNode): ExpressionAst | undefined {\n  return (\n    FunctionCallAst.cast(node) ??\n    ArrayLiteralAst.cast(node) ??\n    StringLiteralExprAst.cast(node) ??\n    NumberLiteralExprAst.cast(node) ??\n    BooleanLiteralExprAst.cast(node) ??\n    ObjectLiteralExprAst.cast(node) ??\n    IdentifierAst.cast(node)\n  );\n}\n\nexport class AttributeArgAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  name(): IdentifierAst | undefined {\n    if (!this.colon()) return undefined;\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  colon(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Colon');\n  }\n\n  value(): ExpressionAst | undefined {\n    if (this.colon()) {\n      let pastColon = false;\n      for (const child of this.syntax.children()) {\n        if (!(child instanceof SyntaxNode)) {\n          if (child.kind === 'Colon') pastColon = true;\n          continue;\n        }\n        if (pastColon) {\n          const expr = castExpression(child);\n          if (expr) return expr;\n        }\n      }\n      return undefined;\n    }\n    return findFirstChild(this.syntax, castExpression);\n  }\n\n  static cast(node: SyntaxNode): AttributeArgAst | undefined {\n    return node.kind === 'AttributeArg' ? new AttributeArgAst(node) : undefined;\n  }\n}\n","import type { AstNode } from '../ast-helpers';\nimport { filterChildren, findChildToken, findFirstChild } from '../ast-helpers';\nimport type { SyntaxNode, SyntaxToken } from '../red';\nimport { AttributeArgAst } from './expressions';\nimport { QualifiedNameAst } from './qualified-name';\n\nexport class AttributeArgListAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  lparen(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LParen');\n  }\n\n  rparen(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RParen');\n  }\n\n  *args(): Iterable<AttributeArgAst> {\n    yield* filterChildren(this.syntax, AttributeArgAst.cast);\n  }\n\n  static cast(node: SyntaxNode): AttributeArgListAst | undefined {\n    return node.kind === 'AttributeArgList' ? new AttributeArgListAst(node) : undefined;\n  }\n}\n\nexport class FieldAttributeAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  at(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'At');\n  }\n\n  name(): QualifiedNameAst | undefined {\n    return findFirstChild(this.syntax, QualifiedNameAst.cast);\n  }\n\n  argList(): AttributeArgListAst | undefined {\n    return findFirstChild(this.syntax, AttributeArgListAst.cast);\n  }\n\n  static cast(node: SyntaxNode): FieldAttributeAst | undefined {\n    return node.kind === 'FieldAttribute' ? new FieldAttributeAst(node) : undefined;\n  }\n}\n\nexport class ModelAttributeAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  doubleAt(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'DoubleAt');\n  }\n\n  name(): QualifiedNameAst | undefined {\n    return findFirstChild(this.syntax, QualifiedNameAst.cast);\n  }\n\n  argList(): AttributeArgListAst | undefined {\n    return findFirstChild(this.syntax, AttributeArgListAst.cast);\n  }\n\n  static cast(node: SyntaxNode): ModelAttributeAst | undefined {\n    return node.kind === 'ModelAttribute' ? new ModelAttributeAst(node) : undefined;\n  }\n}\n","import type { AstNode } from '../ast-helpers';\nimport { findChildToken, findFirstChild } from '../ast-helpers';\nimport type { SyntaxNode, SyntaxToken } from '../red';\nimport { AttributeArgListAst } from './attributes';\nimport { QualifiedNameAst } from './qualified-name';\n\nexport class TypeAnnotationAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  /** The annotation's reference, doubling as the constructor callee when an {@link argList} follows. */\n  name(): QualifiedNameAst | undefined {\n    return findFirstChild(this.syntax, QualifiedNameAst.cast);\n  }\n\n  /** Present when the annotation is a constructor (`Vector(1536)`) rather than a plain reference. */\n  argList(): AttributeArgListAst | undefined {\n    return findFirstChild(this.syntax, AttributeArgListAst.cast);\n  }\n\n  isConstructor(): boolean {\n    return this.argList() !== undefined;\n  }\n\n  lbracket(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LBracket');\n  }\n\n  rbracket(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RBracket');\n  }\n\n  questionMark(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Question');\n  }\n\n  isList(): boolean {\n    return this.lbracket() !== undefined;\n  }\n\n  isOptional(): boolean {\n    return this.questionMark() !== undefined;\n  }\n\n  static cast(node: SyntaxNode): TypeAnnotationAst | undefined {\n    return node.kind === 'TypeAnnotation' ? new TypeAnnotationAst(node) : undefined;\n  }\n}\n","import type { AstNode, BracedBlock } from '../ast-helpers';\nimport { filterChildren, findChildToken, findFirstChild } from '../ast-helpers';\nimport { SyntaxNode, type SyntaxToken } from '../red';\nimport { FieldAttributeAst, ModelAttributeAst } from './attributes';\nimport type { ExpressionAst } from './expressions';\nimport { castExpression } from './expressions';\nimport { IdentifierAst } from './identifier';\nimport { TypeAnnotationAst } from './type-annotation';\n\n/**\n * What may appear inside a `namespace` block: models, composite types, and\n * extension (block) declarations. `types {}` blocks and nested `namespace`\n * blocks are document-only, so they are not namespace members.\n */\nexport type NamespaceMemberAst =\n  | ModelDeclarationAst\n  | CompositeTypeDeclarationAst\n  | GenericBlockDeclarationAst;\n\nexport type DeclarationAst = NamespaceMemberAst | TypesBlockAst | NamespaceDeclarationAst;\nexport type AttributeAst = FieldAttributeAst | ModelAttributeAst;\nexport type BlockMemberAst = FieldDeclarationAst | ModelAttributeAst;\nexport type GenericBlockMemberAst = KeyValuePairAst | ModelAttributeAst;\n\nfunction castNamespaceMember(node: SyntaxNode): NamespaceMemberAst | undefined {\n  return (\n    ModelDeclarationAst.cast(node) ??\n    CompositeTypeDeclarationAst.cast(node) ??\n    GenericBlockDeclarationAst.cast(node)\n  );\n}\n\nexport class DocumentAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  *declarations(): Iterable<DeclarationAst> {\n    yield* filterChildren(\n      this.syntax,\n      (node) =>\n        castNamespaceMember(node) ?? TypesBlockAst.cast(node) ?? NamespaceDeclarationAst.cast(node),\n    );\n  }\n\n  static cast(node: SyntaxNode): DocumentAst | undefined {\n    return node.kind === 'Document' ? new DocumentAst(node) : undefined;\n  }\n}\n\nexport class ModelDeclarationAst implements BracedBlock {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  keyword(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Ident');\n  }\n\n  name(): IdentifierAst | undefined {\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  lbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LBrace');\n  }\n\n  rbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RBrace');\n  }\n\n  *fields(): Iterable<FieldDeclarationAst> {\n    yield* filterChildren(this.syntax, FieldDeclarationAst.cast);\n  }\n\n  *attributes(): Iterable<ModelAttributeAst> {\n    yield* filterChildren(this.syntax, ModelAttributeAst.cast);\n  }\n\n  *members(): Iterable<BlockMemberAst> {\n    yield* filterChildren(\n      this.syntax,\n      (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node),\n    );\n  }\n\n  static cast(node: SyntaxNode): ModelDeclarationAst | undefined {\n    return node.kind === 'ModelDeclaration' ? new ModelDeclarationAst(node) : undefined;\n  }\n}\n\nexport class CompositeTypeDeclarationAst implements BracedBlock {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  keyword(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Ident');\n  }\n\n  name(): IdentifierAst | undefined {\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  lbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LBrace');\n  }\n\n  rbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RBrace');\n  }\n\n  *fields(): Iterable<FieldDeclarationAst> {\n    yield* filterChildren(this.syntax, FieldDeclarationAst.cast);\n  }\n\n  *attributes(): Iterable<ModelAttributeAst> {\n    yield* filterChildren(this.syntax, ModelAttributeAst.cast);\n  }\n\n  *members(): Iterable<BlockMemberAst> {\n    yield* filterChildren(\n      this.syntax,\n      (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node),\n    );\n  }\n\n  static cast(node: SyntaxNode): CompositeTypeDeclarationAst | undefined {\n    return node.kind === 'CompositeTypeDeclaration'\n      ? new CompositeTypeDeclarationAst(node)\n      : undefined;\n  }\n}\n\nexport class NamespaceDeclarationAst implements BracedBlock {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  keyword(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Ident');\n  }\n\n  name(): IdentifierAst | undefined {\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  lbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LBrace');\n  }\n\n  rbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RBrace');\n  }\n\n  *declarations(): Iterable<NamespaceMemberAst> {\n    yield* filterChildren(this.syntax, castNamespaceMember);\n  }\n\n  static cast(node: SyntaxNode): NamespaceDeclarationAst | undefined {\n    return node.kind === 'Namespace' ? new NamespaceDeclarationAst(node) : undefined;\n  }\n}\n\nexport class TypesBlockAst implements BracedBlock {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  keyword(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Ident');\n  }\n\n  lbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LBrace');\n  }\n\n  rbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RBrace');\n  }\n\n  *declarations(): Iterable<NamedTypeDeclarationAst> {\n    yield* filterChildren(this.syntax, NamedTypeDeclarationAst.cast);\n  }\n\n  static cast(node: SyntaxNode): TypesBlockAst | undefined {\n    return node.kind === 'TypesBlock' ? new TypesBlockAst(node) : undefined;\n  }\n}\n\nexport class GenericBlockDeclarationAst implements BracedBlock {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  keyword(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Ident');\n  }\n\n  name(): IdentifierAst | undefined {\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  lbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'LBrace');\n  }\n\n  rbrace(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'RBrace');\n  }\n\n  *entries(): Iterable<KeyValuePairAst> {\n    yield* filterChildren(this.syntax, KeyValuePairAst.cast);\n  }\n\n  *attributes(): Iterable<ModelAttributeAst> {\n    yield* filterChildren(this.syntax, ModelAttributeAst.cast);\n  }\n\n  *members(): Iterable<GenericBlockMemberAst> {\n    yield* filterChildren(\n      this.syntax,\n      (node) => KeyValuePairAst.cast(node) ?? ModelAttributeAst.cast(node),\n    );\n  }\n\n  static cast(node: SyntaxNode): GenericBlockDeclarationAst | undefined {\n    return node.kind === 'GenericBlockDeclaration'\n      ? new GenericBlockDeclarationAst(node)\n      : undefined;\n  }\n}\n\nexport class KeyValuePairAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  key(): IdentifierAst | undefined {\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  equals(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Equals');\n  }\n\n  value(): ExpressionAst | undefined {\n    let pastEquals = false;\n    for (const child of this.syntax.children()) {\n      if (!(child instanceof SyntaxNode)) {\n        if (child.kind === 'Equals') pastEquals = true;\n        continue;\n      }\n      if (pastEquals) {\n        const expr = castExpression(child);\n        if (expr) return expr;\n      }\n    }\n    return undefined;\n  }\n\n  static cast(node: SyntaxNode): KeyValuePairAst | undefined {\n    return node.kind === 'KeyValuePair' ? new KeyValuePairAst(node) : undefined;\n  }\n}\n\nexport class FieldDeclarationAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  name(): IdentifierAst | undefined {\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  typeAnnotation(): TypeAnnotationAst | undefined {\n    return findFirstChild(this.syntax, TypeAnnotationAst.cast);\n  }\n\n  *attributes(): Iterable<FieldAttributeAst> {\n    yield* filterChildren(this.syntax, FieldAttributeAst.cast);\n  }\n\n  static cast(node: SyntaxNode): FieldDeclarationAst | undefined {\n    return node.kind === 'FieldDeclaration' ? new FieldDeclarationAst(node) : undefined;\n  }\n}\n\nexport class NamedTypeDeclarationAst implements AstNode {\n  readonly syntax: SyntaxNode;\n\n  constructor(syntax: SyntaxNode) {\n    this.syntax = syntax;\n  }\n\n  name(): IdentifierAst | undefined {\n    return findFirstChild(this.syntax, IdentifierAst.cast);\n  }\n\n  equals(): SyntaxToken | undefined {\n    return findChildToken(this.syntax, 'Equals');\n  }\n\n  typeAnnotation(): TypeAnnotationAst | undefined {\n    return findFirstChild(this.syntax, TypeAnnotationAst.cast);\n  }\n\n  *attributes(): Iterable<FieldAttributeAst> {\n    yield* filterChildren(this.syntax, FieldAttributeAst.cast);\n  }\n\n  static cast(node: SyntaxNode): NamedTypeDeclarationAst | undefined {\n    return node.kind === 'NamedTypeDeclaration' ? new NamedTypeDeclarationAst(node) : undefined;\n  }\n}\n"],"mappings":";;;;;;;;AAWA,IAAa,cAAb,MAA0C;CACxC;CACA;CACA;CACA;CACA;;CAEA;CAEA,YAAY,OAAmB,QAA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