abla/compiler/parser

Generated from source.

Import with import "abla/compiler/parser".

Source: abla/compiler/parser/entry.ab

ParserCursor (class)

compile class ParserCursor

An opaque cursor over an embedded-language source site. Use the parser operations to inspect or advance it during compilation.

SyntaxExpression (class)

compile class SyntaxExpression

An opaque handle to a compiler syntax expression. Construct or inspect it through the compile-time syntax API.

GeneratedModuleBuilder (class)

compile class GeneratedModuleBuilder

An opaque compile-time builder that owns generated declarations until they are published.

TypedAccessPath (class)

compile class TypedAccessPath

An opaque compile-time path describing a root and ordered projections used by access analysis.

compilerRegisterSubparser (extern)

compile extern:"compiler" fun compilerRegisterSubparser(
    name: string,
    parser: (ParserCursor) -> SyntaxExpression,
    rawBoundary: ((ParserCursor) -> SyntaxExpression)? = null
)

Registers parser for the embedded language named name. The parser receives a source cursor and returns an Abla syntax expression. Invalid registrations produce compile-time diagnostics.

parserExpect (extern)

compile extern:"parser" fun parserExpect(cursor: ParserCursor, token: string)

Consumes token at cursor or reports a parser diagnostic if it does not match.

parserAt (extern)

compile extern:"parser" fun parserAt(cursor: ParserCursor, token: string): bool

Returns true if the next parser token matches the requested text without consuming it.

parserConsume (extern)

compile extern:"parser" fun parserConsume(cursor: ParserCursor, token: string): bool

Consumes the next token and returns true on a text match, or returns false without advancing.

parserCurrentText (extern)

compile extern:"parser" fun parserCurrentText(cursor: ParserCursor): string

Returns the current cursor token's source text, or an empty string at end of input.

parserTextAhead (extern)

compile extern:"parser" fun parserTextAhead(
    cursor: ParserCursor,
    ahead: int
): string

The text of the token ahead tokens past the current one (0 is the current token), without consuming anything: "" past the end and for a negative ahead. Lets a provider look at what follows before choosing a parse.

parserRawAt (extern)

compile extern:"parser" fun parserRawAt(
    cursor: ParserCursor,
    text: string
): bool

Returns whether the source at cursor starts with exact text, without advancing.

parserRawConsume (extern)

compile extern:"parser" fun parserRawConsume(
    cursor: ParserCursor,
    text: string
): bool

Consumes exact text from cursor and returns true on a match. A mismatch returns false without advancing.

parserRawExpect (extern)

compile extern:"parser" fun parserRawExpect(cursor: ParserCursor, text: string)

Consumes exact text from cursor or reports a diagnostic if it is absent.

parserRawTakeUntil (extern)

compile extern:"parser" fun parserRawTakeUntil(
    cursor: ParserCursor,
    delimiters: string
): string

Consumes source until (but not including) any byte in delimiters.

parserRawTakeUntilText (extern)

compile extern:"parser" fun parserRawTakeUntilText(
    cursor: ParserCursor,
    delimiter: string
): string

Consumes source until (but not including) one exact delimiter string. This is the linear-time form for embedded multi-line languages whose payload may legitimately contain any individual delimiter byte.

parserRawLineRecordsValid (extern)

compile extern:"parser" fun parserRawLineRecordsValid(
    source: string,
    directiveCatalog: string
): bool

Validates a line-oriented embedded language without interpreting each byte through staged Abla. Records may be labels, alphabetic instruction tokens, comments beginning with #, or dot directives listed one per catalog line.

parserRawInsertAfterTopLevelRecord (extern)

compile extern:"parser" fun parserRawInsertAfterTopLevelRecord(
    source: string,
    record: string,
    insertion: string
): string

Inserts text after the first top-level line whose initial token exactly matches record; nested .pushsection regions are skipped.

parserRawInsertBeforeTopLevelRecord (extern)

compile extern:"parser" fun parserRawInsertBeforeTopLevelRecord(
    source: string,
    record: string,
    insertion: string
): string

Returns the source with text inserted before the first matching top-level record, skipping nested sections.

parserRawGuardNestedEntries (extern)

compile extern:"parser" fun parserRawGuardNestedEntries(
    source: string,
    entryRecord: string,
    beforeEntry: string,
    afterEntry: string
): string

Inserts caller-defined text immediately before and after every nested entry record in one linear pass, without teaching the compiler a target instruction set or ABI.

parserRawWrapTopLevelRecord (extern)

compile extern:"parser" fun parserRawWrapTopLevelRecord(
    source: string,
    record: string,
    beforeRecord: string,
    afterRecord: string
): string

Wraps the first matching top-level record with caller-defined text in one bounded pass. Nested .pushsection regions are ignored.

parserRawTakeName (extern)

compile extern:"parser" fun parserRawTakeName(cursor: ParserCursor): string

Consumes a run of name characters from cursor and returns the source spelling. If no name starts there, reports a parser error.

parserRawTakeSymbol (extern)

compile extern:"parser" fun parserRawTakeSymbol(cursor: ParserCursor): string

Consumes a conventional object/linker symbol made from alphanumeric bytes, _, ., and $. Target subparsers decide where such a symbol is valid.

parserRawSkipWhitespace (extern)

compile extern:"parser" fun parserRawSkipWhitespace(cursor: ParserCursor)

Advances cursor past raw whitespace at the current position.

parserRawEnd (extern)

compile extern:"parser" fun parserRawEnd(cursor: ParserCursor): bool

Returns whether cursor has reached the end of the available source.

parserRawPosition (extern)

compile extern:"parser" fun parserRawPosition(cursor: ParserCursor): int

Current byte position in the owning source module. Raw subparsers use this to retain precise spans for embedded languages without accessing cursor internals or mutating compiler state.

parserSiteKey (extern)

compile extern:"parser" fun parserSiteKey(cursor: ParserCursor): string

Where this $name is, as a key for what the subparser names after its site (a generated type, a namespace): the method, function or global that holds it and its offset there (an identifier's characters). Unlike parserRawPosition, an edit outside that declaration (a line or an import above it) leaves the key alone, so the names, and the program, don't change. Unique within its module; combine it with parserSourceIdentity where names must differ across modules.

parserSourceIdentity (extern)

compile extern:"parser" fun parserSourceIdentity(cursor: ParserCursor): string

Canonical identity of the module currently owned by this parser cursor. Providers can combine it with source spans when constructing namespaces; unlike byte offsets, it distinguishes otherwise identical imported files.

parserFail (extern)

compile extern:"parser" fun parserFail(cursor: ParserCursor, message: string)

Reports a compile-time parser diagnostic using message at cursor.

parserParseAblaExpression (extern)

compile extern:"parser" fun parserParseAblaExpression(
    cursor: ParserCursor
): SyntaxExpression

Parses an Abla expression at cursor, advancing it and returning the syntax handle. Invalid expressions produce parser diagnostics.

parserTemplatePartIsText (extern)

compile extern:"parser" fun parserTemplatePartIsText(
    cursor: ParserCursor, template: SyntaxExpression, index: int
): bool

A parsed string template's text fragments and string-valued interpolations both have syntaxKind "string". This predicate distinguishes fragments by their owned STRING_TEXT token span, without evaluating any interpolation.

compilerFunctionAnnotationArgument (extern)

compile extern:"compiler" fun compilerFunctionAnnotationArgument(
    handle: int,
    annotation: int,
    argument: int
): SyntaxExpression

Read-only structural inspection. Handles remain compilation-scoped and the child operation borrows the same immutable syntax tree. An annotation's argument as syntax (see compilerFunctionAnnotationArgumentCount).

Compiler.annotationArgument (extension compile.fun)

compile fun Compiler.annotationArgument(
    function: int,
    annotation: int,
    argument: int = 0
): SyntaxExpression

Returns the annotation argument as syntax, reporting a compile-time error for an invalid handle or unavailable argument.

syntaxKind (extern)

compile extern:"parser" fun syntaxKind(expression: SyntaxExpression): string

Returns the compiler's kind name for expression.

syntaxText (extern)

compile extern:"parser" fun syntaxText(expression: SyntaxExpression): string

Returns the compiler syntax node's text payload for expression.

syntaxChildCount (extern)

compile extern:"parser" fun syntaxChildCount(expression: SyntaxExpression): int

Returns the number of immediate children of expression.

syntaxChild (extern)

compile extern:"parser" fun syntaxChild(
    expression: SyntaxExpression,
    index: int
): SyntaxExpression

Returns child index of expression as a syntax handle. Invalid indices or expression handles produce a compile-time error.

syntaxBegin (extern)

compile extern:"parser" fun syntaxBegin(expression: SyntaxExpression): int

Returns the beginning byte offset of expression in the parser's source.

syntaxEnd (extern)

compile extern:"parser" fun syntaxEnd(expression: SyntaxExpression): int

Returns the exclusive ending byte offset of expression in the parser's source.

typedExpressionType (extern)

compile extern:"compiler" fun typedExpressionType(
    expression: SyntaxExpression
): string

Direct-call typed handles are resolved against the candidate declaration set. Ambiguous or non-call targets are compile-time diagnostics.

typedExpressionTypeHandle (extern)

compile extern:"compiler" fun typedExpressionTypeHandle(
    expression: SyntaxExpression
): int

Returns the resolved type handle of an expression, reporting a compile-time error if no resolved type is available.

typedExpressionKind (extern)

compile extern:"compiler" fun typedExpressionKind(
    expression: SyntaxExpression
): string

Returns the expression's syntax kind or reports a compile-time error for an invalid syntax handle.

typedCallTarget (extern)

compile extern:"compiler" fun typedCallTarget(
    expression: SyntaxExpression
): int

Returns the declaration handle for the resolved call in expression. An invalid handle or a call that has not resolved produces a compile-time diagnostic.

typedCallArgumentType (extern)

compile extern:"compiler" fun typedCallArgumentType(
    expression: SyntaxExpression,
    argument: int
): string

Returns the indexed argument's resolved type spelling, reporting a compile-time error for an unresolved call or invalid index.

typedCallArgumentCount (extern)

compile extern:"compiler" fun typedCallArgumentCount(
    expression: SyntaxExpression
): int

Returns the number of explicit call arguments excluding the receiver, reporting a compile-time error for non-call syntax.

typedCallArgument (extern)

compile extern:"compiler" fun typedCallArgument(
    expression: SyntaxExpression,
    argument: int
): SyntaxExpression

Returns the indexed explicit argument's syntax, reporting a compile-time error for an invalid call or argument index.

typedCallReceiverType (extern)

compile extern:"compiler" fun typedCallReceiverType(
    expression: SyntaxExpression
): string

Valid only for a member call. Direct calls have no receiver expression.

typedCallParameterTypeHandle (extern)

compile extern:"compiler" fun typedCallParameterTypeHandle(
    expression: SyntaxExpression,
    parameter: int
): int

Selected-signature metadata. These operations resolve the same declaration handle as typedCallTarget; they never repeat name lookup in extension code.

typedCallResultTypeHandle (extern)

compile extern:"compiler" fun typedCallResultTypeHandle(
    expression: SyntaxExpression
): int

Returns the resolved call result type handle or reports a compile-time error if the call is unresolved.

typedCallArgumentParameter (extern)

compile extern:"compiler" fun typedCallArgumentParameter(
    expression: SyntaxExpression,
    argument: int
): int

Returns the parameter index selected for the indexed argument, reporting a compile-time error for an unresolved call or invalid argument index.

typedCallArgumentConversion (extern)

compile extern:"compiler" fun typedCallArgumentConversion(
    expression: SyntaxExpression,
    argument: int
): string

Semantic adaptation selected for this source argument: none, borrow.read, nullable.inject, string.to-cstring, integer.widen, or integer.narrow.

typedCallInsertedDefaultCount (extern)

compile extern:"compiler" fun typedCallInsertedDefaultCount(
    expression: SyntaxExpression
): int

Returns the number of defaults inserted by call resolution, reporting a compile-time error for an unresolved call.

typedCallParameterOwnership (extern)

compile extern:"compiler" fun typedCallParameterOwnership(
    expression: SyntaxExpression,
    parameter: int
): string

Returns the selected parameter's ownership kind, reporting a compile-time error for an unresolved call or invalid parameter index.

typedCallIsCompileOnly (extern)

compile extern:"compiler" fun typedCallIsCompileOnly(
    expression: SyntaxExpression
): bool

Returns whether the call resolves to a compile-only function, reporting a compile-time error for an unresolved call.

typedCallIsTrusted (extern)

compile extern:"compiler" fun typedCallIsTrusted(
    expression: SyntaxExpression
): bool

Returns whether the call resolves to a trusted function, reporting a compile-time error for an unresolved call.

typedCallIsContract (extern)

compile extern:"compiler" fun typedCallIsContract(
    expression: SyntaxExpression
): bool

Returns whether the call resolves through a contract, reporting a compile-time error for an unresolved call.

typedExpressionReadCount (extern)

compile extern:"compiler" fun typedExpressionReadCount(
    expression: SyntaxExpression
): int

Typed dependency and mutation reflection. Returned paths are immutable, compilation-scoped handles owned by the resolved deferred-expression snapshot.

typedExpressionRead (extern)

compile extern:"compiler" fun typedExpressionRead(
    expression: SyntaxExpression,
    index: int
): TypedAccessPath

Returns the indexed read path of a resolved expression, reporting a compile-time error for an unavailable path.

typedExpressionWriteCount (extern)

compile extern:"compiler" fun typedExpressionWriteCount(
    expression: SyntaxExpression
): int

Returns the number of known write paths for a resolved expression, reporting a compile-time error if access analysis is unavailable.

typedExpressionWrite (extern)

compile extern:"compiler" fun typedExpressionWrite(
    expression: SyntaxExpression,
    index: int
): TypedAccessPath

Returns the indexed write path of a resolved expression, reporting a compile-time error for an unavailable path.

typedExpressionConsumeCount (extern)

compile extern:"compiler" fun typedExpressionConsumeCount(
    expression: SyntaxExpression
): int

Returns the number of known consumed paths for a resolved expression, reporting a compile-time error if access analysis is unavailable.

typedExpressionConsume (extern)

compile extern:"compiler" fun typedExpressionConsume(
    expression: SyntaxExpression,
    index: int
): TypedAccessPath

Returns the indexed consumed path of a resolved expression, reporting a compile-time error for an unavailable path.

typedExpressionReadsUnknown (extern)

compile extern:"compiler" fun typedExpressionReadsUnknown(
    expression: SyntaxExpression
): bool

Returns whether a resolved expression may read unknown storage, reporting a compile-time error if access analysis is unavailable.

typedExpressionWritesUnknown (extern)

compile extern:"compiler" fun typedExpressionWritesUnknown(
    expression: SyntaxExpression
): bool

Returns whether a resolved expression may write unknown storage, reporting a compile-time error if access analysis is unavailable.

typedExpressionHasEffect (extern)

compile extern:"compiler" fun typedExpressionHasEffect(
    expression: SyntaxExpression,
    effect: string
): bool

Returns whether effect analysis records the named effect for a resolved expression, reporting a compile-time error when the analysis or effect name is unavailable.

typedFunctionReadCount (extern)

compile extern:"compiler" fun typedFunctionReadCount(function: int): int

Returns the number of known read paths in a function's access summary, reporting a compile-time error for an invalid handle.

typedFunctionRead (extern)

compile extern:"compiler" fun typedFunctionRead(
    function: int,
    index: int
): TypedAccessPath

Returns the indexed read path in a function's access summary, reporting a compile-time error for an invalid handle or index.

typedFunctionWriteCount (extern)

compile extern:"compiler" fun typedFunctionWriteCount(function: int): int

Returns the number of known write paths in a function's access summary, reporting a compile-time error for an invalid handle.

typedFunctionWrite (extern)

compile extern:"compiler" fun typedFunctionWrite(
    function: int,
    index: int
): TypedAccessPath

Returns the indexed write path in a function's access summary, reporting a compile-time error for an invalid handle or index.

typedFunctionReadsUnknown (extern)

compile extern:"compiler" fun typedFunctionReadsUnknown(function: int): bool

Returns whether a function may read unknown storage, reporting a compile-time error for an invalid handle.

typedFunctionWritesUnknown (extern)

compile extern:"compiler" fun typedFunctionWritesUnknown(function: int): bool

Returns whether a function may write unknown storage, reporting a compile-time error for an invalid handle.

typedFunctionHasEffect (extern)

compile extern:"compiler" fun typedFunctionHasEffect(
    function: int,
    effect: string
): bool

Returns whether a function's effect summary contains the named effect, reporting a compile-time error for an invalid handle or effect name.

typedAccessRootKind (extern)

compile extern:"compiler" fun typedAccessRootKind(
    path: TypedAccessPath
): string

Returns the path's root kind or reports a compile-time error for a stale or invalid path handle.

typedAccessRootIdentity (extern)

compile extern:"compiler" fun typedAccessRootIdentity(
    path: TypedAccessPath
): string

Returns the path's root identity or reports a compile-time error for a stale or invalid path handle.

typedAccessRootParameter (extern)

compile extern:"compiler" fun typedAccessRootParameter(
    path: TypedAccessPath
): int

Returns the path's recorded root parameter index or reports a compile-time error for a stale or invalid path handle.

typedAccessSegmentCount (extern)

compile extern:"compiler" fun typedAccessSegmentCount(
    path: TypedAccessPath
): int

Returns the number of segments after the path root or reports a compile-time error for a stale or invalid path handle.

typedAccessSegmentKind (extern)

compile extern:"compiler" fun typedAccessSegmentKind(
    path: TypedAccessPath,
    index: int
): string

Returns the indexed path segment's kind, reporting a compile-time error for an invalid path or index.

typedAccessSegmentName (extern)

compile extern:"compiler" fun typedAccessSegmentName(
    path: TypedAccessPath,
    index: int
): string

Returns the indexed path segment's recorded name, reporting a compile-time error for an invalid path or index.

typedAccessSegmentIndex (extern)

compile extern:"compiler" fun typedAccessSegmentIndex(
    path: TypedAccessPath,
    index: int
): int

Returns the indexed path segment's recorded integer index, reporting a compile-time error for an invalid path or index.

typedAccessPathsIntersect (extern)

compile extern:"compiler" fun typedAccessPathsIntersect(
    left: TypedAccessPath,
    right: TypedAccessPath
): bool

Returns whether the two access paths can overlap, reporting a compile-time error for an invalid path.

compilerRecordExtensionRequest (extern)

compile extern:"compiler" fun compilerRecordExtensionRequest(
    namespace: string,
    payload: string,
    expression: SyntaxExpression,
    finalizer: (string, SyntaxExpression) -> string
)

Records a request while a subparser owns the syntax handle. The finalizer runs in the same bounded compile-time machine and returns one virtual module which is validated transactionally with the candidate program.

compilerRecordGeneratedExtensionRequest (extern)

compile extern:"compiler" fun compilerRecordGeneratedExtensionRequest(
    namespace: string,
    payload: string,
    expression: SyntaxExpression,
    finalizer: (string, SyntaxExpression) -> GeneratedModuleBuilder
)

Direct owned-AST finalization. The returned builder never becomes source text: its declarations are published with namespace/span provenance into the candidate parse result and pass the ordinary semantic/ownership/IR pipeline.

syntaxInteger (extern)

compile extern:"parser" fun syntaxInteger(value: int): SyntaxExpression

Builds syntax for an integer literal containing value.

syntaxString (extern)

compile extern:"parser" fun syntaxString(value: string): SyntaxExpression

Builds syntax for a string literal containing value.

syntaxBoolean (extern)

compile extern:"parser" fun syntaxBoolean(value: bool): SyntaxExpression

Builds syntax for a boolean literal containing value.

syntaxNull (extern)

compile extern:"parser" fun syntaxNull(): SyntaxExpression

Builds syntax for the null literal.

syntaxCompile (compile.fun)

compile fun syntaxCompile(
    value: SyntaxExpression,
    origin: SyntaxExpression = value
): SyntaxExpression

The same expression as #value: evaluate the child at compile time and freeze its result into the program. Ordinary compile-time limits, effects and value-escape rules apply, including when another subparser builds it. Supply a parsed origin when value was synthesized without source spans: distinct origins keep compile sites distinct and locate their diagnostics.

syntaxIdentifier (extern)

compile extern:"parser" fun syntaxIdentifier(value: string): SyntaxExpression

Builds syntax for an identifier spelled value. It is resolved when the generated expression is analyzed.

syntaxBinary (extern)

compile extern:"parser" fun syntaxBinary(
    operation: string,
    left: SyntaxExpression,
    right: SyntaxExpression
): SyntaxExpression

Returns a binary expression with the given operator spelling and the supplied left and right syntax.

syntaxArray (extern)

compile extern:"parser" fun syntaxArray(
    elements: array<SyntaxExpression>
): SyntaxExpression

Builds array literal syntax from the supplied child expressions in order.

syntaxCall (extern)

compile extern:"parser" fun syntaxCall(
    name: string,
    arguments: array<SyntaxExpression>
): SyntaxExpression

Builds call syntax from the supplied function name and argument expressions. The call is resolved when the generated expression is analyzed.

syntaxNamedArgument (extern)

compile extern:"parser" fun syntaxNamedArgument(
    name: string,
    value: SyntaxExpression
): SyntaxExpression

A named argument for a call's argument list: syntaxCall("f", [syntaxNamedArgument("x", value)]) builds what f(x = value) parses to, and the ordinary named-argument rules apply. Valid only as an element of the argument list of syntaxCall, syntaxCallTarget or syntaxMethodCallTarget; anywhere else the subparser fails.

syntaxMember (extern)

compile extern:"parser" fun syntaxMember(
    receiver: SyntaxExpression,
    name: string
): SyntaxExpression

Returns syntax for accessing the named member on the receiver.

syntaxIndex (extern)

compile extern:"parser" fun syntaxIndex(
    receiver: SyntaxExpression,
    index: SyntaxExpression
): SyntaxExpression

Returns syntax for indexing the receiver with the supplied expression.

syntaxIf (extern)

compile extern:"parser" fun syntaxIf(
    condition: SyntaxExpression,
    thenExpression: SyntaxExpression,
    elseExpression: SyntaxExpression
): SyntaxExpression

Returns conditional syntax with the supplied condition and branches.

syntaxReturn (extern)

compile extern:"parser" fun syntaxReturn(
    value: SyntaxExpression
): SyntaxExpression

Returns syntax for returning the supplied value.

syntaxBlock (extern)

compile extern:"parser" fun syntaxBlock(
    statements: array<SyntaxExpression>
): SyntaxExpression

Returns block syntax containing the supplied statements in order.

syntaxLocal (extern)

compile extern:"parser" fun syntaxLocal(
    name: string,
    type: int,
    initializer: SyntaxExpression
): SyntaxExpression

Returns syntax for declaring an immutable local with the supplied name, reflected type, and initializer.

syntaxVariable (extern)

compile extern:"parser" fun syntaxVariable(
    name: string,
    type: int,
    initializer: SyntaxExpression
): SyntaxExpression

Returns syntax for declaring a mutable local with the supplied name, reflected type, and initializer.

syntaxAssign (extern)

compile extern:"parser" fun syntaxAssign(
    name: string,
    value: SyntaxExpression
): SyntaxExpression

Returns assignment syntax with the supplied target and value.

syntaxLambda (extern)

compile extern:"parser" fun syntaxLambda(
    parameterNames: array<string>,
    parameterTypes: array<int>,
    body: SyntaxExpression,
    moving: bool
): SyntaxExpression

Returns lambda syntax with the supplied parameters and body.

syntaxInferredLambda (extern)

compile extern:"parser" fun syntaxInferredLambda(
    parameterNames: array<string>,
    body: SyntaxExpression,
    moving: bool
): SyntaxExpression

Builds the same syntax as a source lambda with unannotated parameters. The surrounding callable use supplies their types during ordinary semantic analysis, so this form is safe to call from the initial subparser phase.

compilerGeneratedModule (extern)

compile extern:"compiler" fun compilerGeneratedModule(
    namespace: string,
    origin: SyntaxExpression
): GeneratedModuleBuilder

Owned, compilation-scoped declaration construction. The builder assigns collision-checked deterministic declaration names and retains compiler-owned SyntaxExpression trees. Direct finalizers publish those AST declarations transactionally; compilerGeneratedModuleSource is the compatibility bridge for older source-returning finalizers.

compilerGeneratedFunction (extern)

compile extern:"compiler" fun compilerGeneratedFunction(
    module: GeneratedModuleBuilder,
    hint: string,
    parameterNames: array<string>,
    parameterTypes: array<int>,
    resultType: int,
    body: SyntaxExpression
): string

Adds a function to the module and returns its generated name, reporting a compile-time error for invalid signature, body, or builder arguments.

compilerGeneratedLiftedFunction (extern)

compile extern:"compiler" fun compilerGeneratedLiftedFunction(
    module: GeneratedModuleBuilder,
    hint: string,
    captureNames: array<string>,
    parameterNames: array<string>,
    parameterTypes: array<int>,
    mutableCaptures: array<bool>,
    resultType: int,
    body: SyntaxExpression
): string

Creates a generated function by rewriting the listed free identifiers to explicit generated parameters. Capture types and mutable modes are checked before the ordinary generated-declaration validation pipeline runs.

compilerGeneratedExportFunction (extern)

compile extern:"compiler" fun compilerGeneratedExportFunction(
    module: GeneratedModuleBuilder,
    name: string,
    parameterNames: array<string>,
    parameterTypes: array<int>,
    resultType: int,
    body: SyntaxExpression
): string

Deliberate source-visible root. Unlike ordinary generated declarations this exact name must be unused in the candidate program.

compilerGeneratedValue (extern)

compile extern:"compiler" fun compilerGeneratedValue(
    module: GeneratedModuleBuilder,
    hint: string,
    type: int,
    initializer: SyntaxExpression
): string

Adds a value to the module and returns its generated name, reporting a compile-time error for an invalid type, initializer, or builder.

compilerGeneratedModuleSource (extern)

compile extern:"compiler" fun compilerGeneratedModuleSource(
    module: GeneratedModuleBuilder
): string

Returns the source spelling of a generated module's declarations, reporting a compile-time error for an invalid builder.

compilerIndependentModuleDeclareGenerated (extern)

compile extern:"compiler" fun compilerIndependentModuleDeclareGenerated(
    destination: int,
    declarations: GeneratedModuleBuilder
): bool

Publishes compiler-owned generated declarations into a standalone module without asking an extension to render, write, or reparse source itself.

IndependentModule.declareGenerated (extension compile.fun)

compile fun IndependentModule.declareGenerated(
    declarations: GeneratedModuleBuilder
): bool

Returns true when a live independent module accepts the generated declarations, reporting a compile-time error for an invalid module or builder.

compilerGeneratedDeclarationCount (extern)

compile extern:"compiler" fun compilerGeneratedDeclarationCount(
    module: GeneratedModuleBuilder
): int

Returns the number of declarations in the generated module, reporting a compile-time error for an invalid builder.

compilerGeneratedDeclarationNamespace (extern)

compile extern:"compiler" fun compilerGeneratedDeclarationNamespace(
    module: GeneratedModuleBuilder,
    declaration: int
): string

Returns the namespace of the indexed generated declaration, reporting a compile-time error for an invalid builder or index.

compilerGeneratedDeclarationOriginBegin (extern)

compile extern:"compiler" fun compilerGeneratedDeclarationOriginBegin(
    module: GeneratedModuleBuilder,
    declaration: int
): int

Returns the starting source byte offset for the indexed declaration's origin, reporting a compile-time error for an invalid builder or index.

compilerGeneratedDeclarationOriginEnd (extern)

compile extern:"compiler" fun compilerGeneratedDeclarationOriginEnd(
    module: GeneratedModuleBuilder,
    declaration: int
): int

Returns the ending source byte offset for the indexed declaration's origin, reporting a compile-time error for an invalid builder or index.

compilerGeneratedDeclarationReference (extern)

compile extern:"compiler" fun compilerGeneratedDeclarationReference(
    module: GeneratedModuleBuilder,
    declaration: int
): SyntaxExpression

Unforgeable references to declarations already owned by this builder. The ordinal is declaration order within the module, not a source-level name.

compilerGeneratedDeclarationCall (extern)

compile extern:"compiler" fun compilerGeneratedDeclarationCall(
    module: GeneratedModuleBuilder,
    declaration: int,
    arguments: array<SyntaxExpression>
): SyntaxExpression

Returns call syntax bound to the indexed generated declaration, reporting a compile-time error for an invalid declaration or argument syntax.

syntaxCallTarget (extern)

compile extern:"compiler" fun syntaxCallTarget(
    target: int,
    arguments: array<SyntaxExpression>
): SyntaxExpression

Builder calls retain the selected declaration handle as compiler-owned provenance. Extensions do not reconstruct or reserve a source-level target name, and an inherent/extension method must use the receiver-bearing form.

syntaxMethodCallTarget (extern)

compile extern:"compiler" fun syntaxMethodCallTarget(
    target: int,
    receiver: SyntaxExpression,
    arguments: array<SyntaxExpression>
): SyntaxExpression

Returns method call syntax bound to a reflected function handle, reporting a compile-time error when the handle or receiver cannot be used.

Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.