/** * Shared lexer utilities for HCL parsing. * Provides common functions for tokenization and string handling. */ /** * Result of reading a quoted string from source. */ export interface QuotedStringResult { /** The unquoted string content */ text: string; /** The index after the closing quote */ end: number; } /** * Result of reading a raw value from source. */ export interface ValueReadResult { /** The raw value text (trimmed) */ raw: string; /** The index after the value */ end: number; } /** * Checks if a character is a quote character (single or double). * @param char - The character to check * @returns True if the character is a quote */ export declare function isQuote(char: string | undefined): boolean; /** * Checks if a character at a given position is escaped by counting preceding backslashes. * Handles consecutive backslashes correctly (e.g., \\\\ is two escaped backslashes). * @param text - The source text * @param index - The index of the character to check * @returns True if the character is escaped */ export declare function isEscaped(text: string, index: number): boolean; /** * Skips whitespace and comments (line and block comments). * Handles "//", block comments, and "#" style comments. * @param text - The source text * @param start - The starting index * @returns The index of the next non-whitespace, non-comment character */ export declare function skipWhitespaceAndComments(text: string, start: number): number; /** * Skips a quoted string, handling escape sequences correctly. * @param text - The source text * @param start - The index of the opening quote * @returns The index after the closing quote */ export declare function skipString(text: string, start: number): number; /** * Skips a heredoc string (<