/**
 * Attribute Collection — Argument Extraction & Descriptor Parsing
 *
 * Extracts attribute arguments from IR expressions and parses
 * attribute descriptor calls (A.attr(AttrCtor, ...args)).
 * Also contains shared constants, types, and utility functions
 * used across the attribute collection pass.
 */
import { Diagnostic, SourceLocation } from "../../../types/diagnostic.js";
import { IrModule, IrExpression, IrIdentifierExpression, IrAttributeTarget, IrAttributeArg, IrType } from "../../types.js";
export declare const ATTRIBUTES_IMPORT_SPECIFIER = "@tsonic/core/lang.js";
export declare const ATTRIBUTE_TARGETS_EXPORT_NAME = "AttributeTargets";
export declare const ATTRIBUTE_TARGETS: readonly IrAttributeTarget[];
export declare const ATTRIBUTE_TARGETS_SET: Set<IrAttributeTarget>;
export type ParseResult<T> = {
    readonly kind: "notMatch";
} | {
    readonly kind: "ok";
    readonly value: T;
} | {
    readonly kind: "error";
    readonly diagnostic: Diagnostic;
};
export type ParsedAttributeDescriptor = {
    readonly attributeType: IrType;
    readonly positionalArgs: readonly IrAttributeArg[];
    readonly namedArgs: ReadonlyMap<string, IrAttributeArg>;
    readonly sourceSpan?: SourceLocation;
};
/**
 * Intermediate representation of a detected attribute marker call
 */
export type AttributeMarker = {
    readonly target: {
        readonly kind: "type";
        readonly name: string;
    } | {
        readonly kind: "function";
        readonly name: string;
    };
    readonly targetSelector: "root" | "ctor" | "method" | "prop";
    readonly selectedMemberName?: string;
    readonly attributeTarget?: IrAttributeTarget;
    readonly attributeType: IrType;
    readonly positionalArgs: readonly IrAttributeArg[];
    readonly namedArgs: ReadonlyMap<string, IrAttributeArg>;
    readonly sourceSpan?: SourceLocation;
};
/**
 * Create a source location for error reporting
 */
export declare const createLocation: (filePath: string, sourceSpan?: SourceLocation) => SourceLocation;
export declare const isAttributesApiIdentifier: (expr: IrExpression, apiNames: ReadonlySet<string>) => expr is IrIdentifierExpression;
export declare const getAttributesApiLocalNames: (module: IrModule) => ReadonlySet<string>;
export declare const getAttributeTargetsApiLocalNames: (module: IrModule) => ReadonlySet<string>;
/**
 * Try to extract an attribute argument from an IR expression.
 * Returns undefined if the expression is not a valid attribute argument.
 */
export declare const tryExtractAttributeArg: (expr: IrExpression) => IrAttributeArg | undefined;
export declare const resolveClrTypeForAttributeCtor: (ctorIdent: IrIdentifierExpression, module: IrModule) => string | undefined;
export declare const makeAttributeType: (ctorIdent: IrIdentifierExpression, module: IrModule) => ParseResult<IrType>;
export declare const parseAttrDescriptorCall: (expr: IrExpression, module: IrModule, apiNames: ReadonlySet<string>) => ParseResult<ParsedAttributeDescriptor>;
//# sourceMappingURL=arg-extractor.d.ts.map