Skip to content

fix: support statement execution in debugger console REPL#85

Merged
CppCXY merged 1 commit intoEmmyLua:masterfrom
sssooonnnggg:master
Apr 15, 2026
Merged

fix: support statement execution in debugger console REPL#85
CppCXY merged 1 commit intoEmmyLua:masterfrom
sssooonnnggg:master

Conversation

@sssooonnnggg
Copy link
Copy Markdown
Contributor

尝试支持下非表达式的 REPL, debug console 输入 a.b = 123 这种 statement 会报错

evalContext->error = "syntax err: ";
evalContext->error.append(evalContext->expr);
return false;
// 尝试作为语句执行(例如 a.b = 123 这样的赋值语句)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我认为应该做简单的语法分析判断是赋值语句还是表达式返回

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CppCXY CppCXY merged commit 227b387 into EmmyLua:master Apr 15, 2026
1 check passed
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.

2 participants