We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
下面的测试用例执行会解析不了上下文的值 @test public void testArithmetic_map() throws Exception { ExpressRunner runner = new ExpressRunner(true, true); runner.addMacro("计算平均成绩","(90天浏览时长 + 数学 + 英语)/3"); IExpressContext<String, Object> context =new DefaultContext<String, Object>(); context.put("90天浏览时长", 88); context.put("数学", 99); context.put("英语", 95); System.out.println(runner.execute("计算平均成绩", context, null, true, false)); }
[90天浏览时长]这样的key读取会有问题,具体的错误逻辑应该在ExpressParse.class中的transferWord2ExpressNode,针对数字开头的key没有考虑上述的特殊情况。 不知道还能不能更新啦改项目,我这边自己打个分支先改造了把
The text was updated successfully, but these errors were encountered:
你的分支给我看下呢,可以通过微信和email深入交流下,因为数字开头的变量也是java语法不识别的。
Sorry, something went wrong.
@baoxingjie 现在支持了吗?
No branches or pull requests
下面的测试用例执行会解析不了上下文的值
@test
public void testArithmetic_map() throws Exception {
ExpressRunner runner = new ExpressRunner(true, true);
runner.addMacro("计算平均成绩","(90天浏览时长 + 数学 + 英语)/3");
IExpressContext<String, Object> context =new DefaultContext<String, Object>();
context.put("90天浏览时长", 88);
context.put("数学", 99);
context.put("英语", 95);
System.out.println(runner.execute("计算平均成绩", context, null, true, false));
}
[90天浏览时长]这样的key读取会有问题,具体的错误逻辑应该在ExpressParse.class中的transferWord2ExpressNode,针对数字开头的key没有考虑上述的特殊情况。
不知道还能不能更新啦改项目,我这边自己打个分支先改造了把
The text was updated successfully, but these errors were encountered: