Skip to content

PromptScript API


Interface: CanonicalProgramOptions

Defined in: core/src/canonical-ast.ts:55

Properties

loc

readonly loc: SourceLocation

Defined in: core/src/canonical-ast.ts:59


meta?

readonly optional meta?: object

Defined in: core/src/canonical-ast.ts:56

fields

readonly fields: object

Key-value pairs

Index Signature

[key: string]: PrimitiveValue | { constraints?: { max?: number; min?: number; options?: readonly PrimitiveValue | { readonly type: "TypeExpression"; readonly kind: "string" | "number" | "boolean" | "enum" | "range" | "list"; readonly params?: readonly (PrimitiveValue | ... 4 more ... | { ...; })[] | undefined; readonly constraints?: { ...; } | undefined; readonly loc: { ...; }; } | { ...; } | readonly (Primitiv...[]; }; kind: "string" | "number" | "boolean" | "enum" | "range" | "list"; loc: { column: number; file: string; line: number; offset?: number; }; params?: readonly PrimitiveValue | { readonly type: "TypeExpression"; readonly kind: "string" | "number" | "boolean" | "enum" | "range" | "list"; readonly params?: readonly (PrimitiveValue | ... 4 more ... | { ...; })[] | undefined; readonly constraints?: { ...; } | undefined; readonly loc: { ...; }; } | { ...; } | readonly (Primitiv...[]; type: "TypeExpression"; } | { loc: { column: number; file: string; line: number; offset?: number; }; type: "TextContent"; value: string; } | readonly PrimitiveValue | { readonly type: "TypeExpression"; readonly kind: "string" | "number" | "boolean" | "enum" | "range" | "list"; readonly params?: readonly (PrimitiveValue | ... 4 more ... | { ...; })[] | undefined; readonly constraints?: { ...; } | undefined; readonly loc: { ...; }; } | { ...; } | readonly (Primitiv...[] | {[key: string]: PrimitiveValue | { readonly type: "TypeExpression"; readonly kind: "string" | "number" | "boolean" | "enum" | "range" | "list"; readonly params?: readonly (PrimitiveValue | ... 4 more ... | { ...; })[] | undefined; readonly constraints?: { ...; } | undefined; readonly loc: { ...; }; } | { ...; } | readonly (Primitiv...; } | { loc: { column: number; file: string; line: number; offset?: number; }; name: string; type: "TemplateExpression"; }

loc

readonly loc: object

Source location

loc.column

readonly column: number

Column number (1-indexed)

loc.file

readonly file: string

File path

loc.line

readonly line: number

Line number (1-indexed)

loc.offset?

readonly optional offset?: number

Byte offset from start of file

params?

readonly optional params?: readonly object[]

Template parameter definitions (for parameterized inheritance)

type

readonly type: "MetaBlock"

Node type discriminator


operations

readonly operations: readonly ProgramOperation[]

Defined in: core/src/canonical-ast.ts:57


syntaxFeatures?

readonly optional syntaxFeatures?: readonly object[]

Defined in: core/src/canonical-ast.ts:58