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\"));");
}</pre>
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
bindcalls -
Handle unexpected continue statement
-
Check arity during bind
-
Don't allow arith conversion on variadic function
-
Correct
bindparameter 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
.atmethod for Map objects -
Various corrections for support of move-only objects
下載: