-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getVariableNames会返回true/false/nil等非变量名 #186
Comments
应该没有针对这个情况做处理,这个情况会直接优化成结果 |
aviator 内部将 true/false 其实也是当成了变量来处理,所以理论上说这个返回也没有错,只是比较出人意料。 |
这是内部实现的逻辑。但是对使用人来说,将true/false当做变量有点意外。此外,nil在wiki上明确说是常量,所以getVariableNames和getVariableFullNames返回ni应该是个bug, 比如以下的表达式:
|
nil 内部其实也只是一个特别的 variable。 这个问题会去修正下,你可以先过滤掉这些 keyword 。 |
嗯,我手动把true/false/nil这些过滤掉的。 |
发布了 4.2.9(可能要等一天等 maven central 同步) |
根据文档描述, getVariableNames和getVariableFullNames返回的是表达式中变量的名字,但是以下表达式的上述两个方法会返回
true
:The text was updated successfully, but these errors were encountered: