/**
 * AST utility functions for constant propagation.
 */
/**
 * Check if a constant value is known (not unknown).
 */
export function isKnown(cv) {
    return cv.type !== 'unknown';
}
/**
 * Create an unknown constant value.
 */
export function createUnknown(line) {
    return { value: null, type: 'unknown', sourceLine: line };
}
/**
 * Create a constant value.
 */
export function createConstant(value, type, line) {
    return { value, type, sourceLine: line };
}
/**
 * Get text content of an AST node.
 */
export function getNodeText(node, source) {
    return source.substring(node.startIndex, node.endIndex);
}
/**
 * Get 1-based line number of an AST node.
 */
export function getNodeLine(node) {
    return node.startPosition.row + 1;
}
//# sourceMappingURL=ast-utils.js.map