fix(spreadsheet): 이름 정의 풀이 — =SUM(값들) 이 범위로 풀림 · 행열 넣기 · 지우기 때 이름 범위 따라감
- 엔진: 식 나무의 이름을 Sheet.이름정의 범위로 바꿔 풂(자기 시트 먼저 · 없으면 다른 시트 · 없는 이름 #NAME?) · 의존 그래프도 범위로 이어짐 - 식 캐시는 시트마다 · rebuild 때 비움 — 이름 바꾸기 · 지우기(시트통째) 뒤 새로 풂 - 행열 넣기 · 지우기: 병합과 같은 범위 옮김으로 이름 범위도 옮김 · 통째로 지워진 이름은 뺌 - 수식 계산 걸음도 이름을 풂 - 시험: test_spreadsheet_analysis.py names 묶음 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TULoa94ZFL26KU6ZqVpjkF
This commit is contained in:
@@ -15,7 +15,7 @@ import { currentLanguageIndex } from "@ui/ui_template_locale";
|
||||
import { parseA1, quoteSheet, toA1 } from "./spreadsheet_address";
|
||||
import { isError, isRange, numberText } from "./spreadsheet_eval";
|
||||
import type { PlacedRange } from "./spreadsheet_eval";
|
||||
import { evalSafe } from "./spreadsheet_graph";
|
||||
import { bindNames, evalSafe } from "./spreadsheet_graph";
|
||||
import { formulaToText, parseFormula } from "./spreadsheet_parser";
|
||||
import type {
|
||||
CalcEngine,
|
||||
@@ -157,7 +157,7 @@ export function evalSteps(
|
||||
for (const n of nodes) {
|
||||
if (n === p.node) vals.set(n, engine.value(sheet, r, c));
|
||||
else {
|
||||
const v = evalSafe(n, ctx);
|
||||
const v = evalSafe(bindNames(n, book, sheet), ctx);
|
||||
if (isRange(v)) continue; // 범위 값(INDEX 등)은 글 그대로
|
||||
vals.set(n, v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user