fix(factors): 修复 AST 优化器并发命名冲突及逻辑运算支持

- 修复 ExpressionFlattener 跨实例临时名称冲突
- 添加 & 和 | 逻辑运算符的 DSL/Parser/Translator 支持
- 增加回归测试验证修复
This commit is contained in:
2026-03-14 01:17:14 +08:00
parent c8808d07eb
commit 2034d60fbb
6 changed files with 220 additions and 8 deletions

View File

@@ -35,6 +35,8 @@ BIN_OP_MAP: Dict[type, str] = {
ast.Pow: "**",
ast.FloorDiv: "//",
ast.Mod: "%",
ast.BitAnd: "&",
ast.BitOr: "|",
}
UNARY_OP_MAP: Dict[type, str] = {