/** * Scanner for identifying top-level HCL blocks in Terraform configuration files. * Handles block detection, label extraction, and body isolation. */ import { HclBlock } from '../../types/blocks'; /** * Options for block scanning. */ export interface ScanOptions { /** Whether to throw ParseError on syntax errors (default: false, logs warning instead) */ strict?: boolean; } /** * Scanner for extracting top-level HCL blocks from Terraform files. * * @example * ```typescript * const scanner = new BlockScanner(); * const blocks = scanner.scan(hclContent, 'main.tf'); * for (const block of blocks) { * console.log(`Found ${block.kind} block: ${block.labels.join('.')}`); * } * ``` */ export declare class BlockScanner { /** * Scans HCL content and extracts all top-level blocks. * * @param content - The HCL source content to scan * @param source - The source file path (for error reporting) * @param options - Scanning options * @returns Array of parsed HCL blocks * @throws {ParseError} If strict mode is enabled and syntax errors are found */ scan(content: string, source: string, options?: ScanOptions): HclBlock[]; }