ChaiScript 5.7.1 发布,C++ 脚本语言
ChaiScript 是第一个也是目前唯一一个与C++的兼容性的脚本语言,受 ECMAScript 影响的嵌入式的功能性语言。
#include <chaiscript/chaicript.hpp>std::string helloWorld(const std::string &t_name) { return "Hello " + t_name + "!"; } int main() { chaiscript::ChaiScript chai; chai.add(chaiscript::fun(&helloWorld), "helloWorld"); chai.eval("puts(helloWorld(\"Bob\"));"); }
ChaiScript 5.7.1 发布,此版本更新内容如下:
-
Build time reduction
-
Build size reduction
-
Performance increases
-
Fixed ~20 crash-bugs found with fuzzy testing #194
-
Let unhandled exceptions propogate to user
-
Report eval_error when break statement is not in loop
-
Fix handling of 0 length scripts closes #193
-
Don't crash on arity mismatch - Specifically affects the case where no overloads exist for a given function
-
Fix error printing for
bind
calls -
Handle unexpected continue statement
-
Check arity during bind
-
Don't allow arith conversion on variadic function
-
Correct
bind
parameter match count -
Add in expected Boxed_Value exception cases
-
Check access to AST, don't allow
;
in func def -
Don't attempt arithmetic unary & call
-
Don't crash on 0 param call to
bind
-
Catch errors during member function dispatch
-
Properly handle type of const bool &
-
Automatic deduction of lambda type signatures
-
Work with non-polymorphic parent/child conversions
-
Move to codecov for coverage reporting
-
Add
.at
method for Map objects -
Various corrections for support of move-only objects
</ul>
下载: