Skip to content

[Bug] vtable-sheet formula-engine 在计算公式参数中包含基本表达式时会进入无限循环导致计算失败 #5048

@xiaojinghui3

Description

@xiaojinghui3

Version

latest

Link to Minimal Reproduction

https://github.com/VisActor/VTable/blob/develop/packages/vtable-sheet/src/formula/formula-engine.ts

Steps to Reproduce

计算如: sum(1, sum(1,1)+1) + 1 时, 参数sum(1,1)+1 会在 // 确保这是整个表达式(没有剩余字符)
if (argsEnd + 1 !== expr.length) {时 判断false 返回。 并无限循环计算这个表达式。

Current Behavior

无法正确计算结果

Expected Behavior

正常计算 sum(1,1)+1

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions