ChaiScript 5.7.1 發布,C++ 腳本語言

jopen 10年前發布 | 9K 次閱讀 ChaiScript

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 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

下載:

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!