Skip to content

fix: 修复二元表达式解析器EOF死循环#40

Merged
ca1e merged 2 commits into
devfrom
fix/parser-binary-deadloop
Apr 22, 2026
Merged

fix: 修复二元表达式解析器EOF死循环#40
ca1e merged 2 commits into
devfrom
fix/parser-binary-deadloop

Conversation

@ca1e

@ca1e ca1e commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 修复 Parser.Fn.csParseExpression 在一元运算符优先级满足条件但游标已到 EOF 时,解析器不前进导致死循环的问题
  • 新增 206 行表达式解析健壮性测试,覆盖正常表达式、边界条件、不完整表达式等场景

Test plan

  • dotnet test 100 tests passed, 0 failures
  • 新增 Expr_* 系列测试验证修复有效

ca1e and others added 2 commits April 23, 2026 00:15
在ParseExpression中,当一元运算符优先级满足条件但游标已到EOF时,
解析器会反复尝试读取而不前进,导致死循环。增加CursorEOF检查。
@ca1e ca1e merged commit 9235f0a into dev Apr 22, 2026
@ca1e ca1e deleted the fix/parser-binary-deadloop branch April 22, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant