/** * 正则表达式复杂度分析器 * * @module RegexEditor/validation/complexity * @description 分析正则表达式的复杂度,评估性能风险并提供优化建议 * * @remarks * 该模块通过遍历 AST 来统计以下复杂度指标: * - 节点总数 * - 最大嵌套深度 * - 分支数量(alternation) * - 量词数量(quantifier) * - 捕获组数量 * - 字符类数量 * * 基于这些指标计算: * - 回溯风险等级(low/medium/high) * - 性能评分(0-100分) * - 优化建议列表 */ import type { ASTNode, ComplexityMetrics } from './types'; export declare const analyzeComplexity: (ast: ASTNode) => ComplexityMetrics;