Commit Graph

302 Commits

Author SHA1 Message Date
Stephen Chung
772e44aa3d Test getter. 2020-08-18 09:25:43 +08:00
Stephen Chung
e75d91e9bf Bring more functions into modules in plugins via rhai_fn(name) attribute. 2020-08-16 23:41:59 +08:00
Stephen Chung
209d1a174c Yet more packages into plugins. 2020-08-15 00:04:10 +08:00
Stephen Chung
c0dc47c9db Convert some packages into plugins. 2020-08-14 13:43:26 +08:00
Stephen Chung
d2ea981fac Merge branch 'master' into plugins 2020-08-14 11:45:52 +08:00
Stephen Chung
b956639c2a Move some math functions into plugins. 2020-08-13 14:57:46 +08:00
J Henry Waugh
0fb61eab00 Fix plugin test 2020-08-12 23:47:57 -05:00
J Henry Waugh
a25f6b35a1 Add new macro_register test which runs in no_std 2020-08-12 23:46:12 -05:00
J Henry Waugh
1a2ef7b531 Fix macro_unroll test 2020-08-12 23:40:50 -05:00
J Henry Waugh
ce8fbe40c4 Fold into fully generic form 2020-08-09 12:13:02 -05:00
J Henry Waugh
3fa252e732 Fold generate_add once more 2020-08-09 12:04:50 -05:00
J Henry Waugh
a45b1d406f Add only_i32 feature support 2020-08-09 11:47:11 -05:00
J Henry Waugh
dc7b36fd11 Fix for stable 2020-08-09 11:42:37 -05:00
J Henry Waugh
a24d11324c Create functional test for generated bulk operations 2020-08-09 11:21:29 -05:00
Stephen Chung
564d3bc339 Add more closure tests. 2020-08-09 22:12:50 +08:00
Ilya Lakhin
d84ef1a0d1 CLosures test fix 2020-08-09 18:55:01 +07:00
Ilya Lakhin
20cff87e14 False-positive capturing prevention bug fix 2020-08-09 18:35:29 +07:00
Stephen Chung
0e344ff3eb Merge branch 'master' into plugins 2020-08-08 23:01:48 +08:00
Stephen Chung
da3cce58d3 Minor refactor. 2020-08-08 22:59:05 +08:00
Stephen Chung
e66873bb83
Merge pull request #27 from Eliah-Lakhin/capturing-bug
Function names capturing as external variables bug
2020-08-08 22:52:20 +08:00
Ilya Lakhin
9c6584240f Unit test for registered functions in anon function context 2020-08-08 19:09:18 +07:00
Stephen Chung
fbad20eb0d Merge branch 'master' into plugins 2020-08-08 16:26:52 +08:00
Stephen Chung
f016655414 Simply test error matching. 2020-08-08 16:03:14 +08:00
J Henry Waugh
75bcbb74eb Fix unrelated CI failure for features 2020-08-06 19:41:19 -05:00
Stephen Chung
26c5b10ef7 Merge branch 'master' into plugins 2020-08-06 10:31:15 +08:00
Stephen Chung
41b41ff834 Fix tests. 2020-08-06 00:24:25 +08:00
Stephen Chung
ae11dbbefe Fix feature flags. 2020-08-05 22:53:01 +08:00
Stephen Chung
07af296ab0 Fix custom syntax test. 2020-08-05 17:02:11 +08:00
Stephen Chung
24346b9728 Merge branch 'master' into plugins 2020-08-04 16:51:22 +08:00
Stephen Chung
3fc35c4f87 Merge from master. 2020-08-03 13:28:29 +08:00
Stephen Chung
4079164bfd Implement closures. 2020-08-03 12:10:20 +08:00
Stephen Chung
dd0177f588 Allow deprecated API. 2020-08-03 10:07:52 +08:00
J Henry Waugh
7219fd6b79 Fix tests/plugins.rs to match new hygiene 2020-08-02 19:49:24 -05:00
Stephen Chung
096eb4493e Engine::load_package API change. 2020-08-02 18:55:22 +08:00
Stephen Chung
5eed5fe6a3 Add plugins test. 2020-08-02 18:53:25 +08:00
Stephen Chung
675c4eb606 Add plugins test. 2020-08-02 15:39:16 +08:00
Stephen Chung
b86c87253b Prevent data races. 2020-08-02 13:33:51 +08:00
Stephen Chung
cc53b21731 Avoid hard-coding variable type for shared. 2020-08-01 22:28:13 +08:00
Stephen Chung
8d0623d07f Add is_shared function. 2020-07-31 18:43:34 +08:00
Stephen Chung
e70e0ff4e2 Fixup. 2020-07-31 16:39:38 +08:00
Ilya Lakhin
89f75bbf0c Merge remote-tracking branch 'schungx/closures' into closures 2020-07-31 13:05:16 +07:00
Ilya Lakhin
4f771d904a Code cleanup 2020-07-31 12:09:32 +07:00
Ilya Lakhin
ca64668e58 take() keyword; shared test with registered functions with callbacks 2020-07-31 11:41:22 +07:00
Ilya Lakhin
060dd33046 Shared Dynamic tests and fixes in Engine; Also fixed a bug in Parser variable capturing 2020-07-31 10:47:22 +07:00
Ilya Lakhin
aa87a7f5ef Fixes in Engine to properly interpret Shared Dynamic 2020-07-31 10:47:22 +07:00
Stephen Chung
7d4620d0d9 Unbounded -> unbound. 2020-07-30 23:29:11 +08:00
Stephen Chung
98b294c699 Implement capturing. 2020-07-30 18:18:28 +08:00
Stephen Chung
8299adf95c Add docs for auto-currying. 2020-07-29 22:43:57 +08:00
Ilya Lakhin
8fc16b40e6 Code style issues fixed 2020-07-29 20:17:18 +07:00
Ilya Lakhin
48356abc83 Autocurry fixes and test 2020-07-29 18:52:54 +07:00
Ilya Lakhin
8e51988b66 A prototype of a new feature to automatically curry of external scope variables 2020-07-29 16:56:32 +07:00
Stephen Chung
e2daba55d7 Refine unicode-xid-ident feature writeup. 2020-07-29 13:57:17 +08:00
Stephen Chung
eeb86f5efb Merge branch 'master' of https://github.com/jonathandturner/rhai 2020-07-29 11:43:48 +08:00
ekicyou
7d333fdc4e add test 2020-07-29 10:41:44 +09:00
ekicyou
288e0a4d14 add unicode_xid, test 2020-07-29 08:25:37 +09:00
Stephen Chung
057f6435a4 Add public_only parameter to module function methods. 2020-07-27 18:10:45 +08:00
Stephen Chung
a3a167424b Allow Rust functions in FnPtr::call_dynamic. 2020-07-27 12:52:32 +08:00
Stephen Chung
878ba0b794 Remove register_raw_fn_XXX API's. 2020-07-26 18:17:55 +08:00
Stephen Chung
6b600704a3 Avoid warnings. 2020-07-26 15:53:22 +08:00
Stephen Chung
94c2f64473 Merge branch 'master' of https://github.com/jonathandturner/rhai 2020-07-25 16:05:11 +08:00
John-John Tedro
1aab77df1c Avoid scanning over slices to validate numerical literals 2020-07-25 09:52:54 +02:00
Stephen Chung
2b0aacde23 Fix Module::set_indexer_set_fn. 2020-07-24 23:16:54 +08:00
Stephen Chung
1a48a2d8ba Refine currying docs. 2020-07-23 15:49:09 +08:00
Ilya Lakhin
82685b7df2 FnPtr::call_dynamic shortcut function that enriches call arguments with curry-ed data automatically 2020-07-23 04:53:40 +07:00
Stephen Chung
6d551f1596 Add currying support. 2020-07-22 23:12:09 +08:00
Stephen Chung
abf66850f6 Enable custom syntax without internals. 2020-07-22 17:05:13 +08:00
Stephen Chung
35374f5b3b Simplify custom syntax. 2020-07-22 13:08:51 +08:00
Stephen Chung
e8b6d0143d Small fixups. 2020-07-20 23:23:12 +08:00
Stephen Chung
3ae7cf4018 Improve treatment of disabled symbols and custom symbols. 2020-07-17 14:50:23 +08:00
Stephen Chung
d119e13b79 Allow binding of this pointer in FnPtr calls. 2020-07-17 10:18:07 +08:00
Stephen Chung
16fbfbb606 Enable call in function-call style. 2020-07-16 12:09:31 +08:00
Stephen Chung
adc96e24bd Fix all features. 2020-07-13 19:38:50 +08:00
Stephen Chung
e8d78bdfde Add support for String in function parameters. 2020-07-13 13:40:51 +08:00
Stephen Chung
8449f8c55e Make API chainable. 2020-07-12 11:46:53 +08:00
Stephen Chung
2a8d63fd5f Refine custom syntax. 2020-07-11 15:09:17 +08:00
Stephen Chung
ebffbf0f98 Refine docs and add custom syntax. 2020-07-10 22:01:47 +08:00
Stephen Chung
99164ebceb Add custom syntax. 2020-07-09 19:54:28 +08:00
Stephen Chung
703cc414b8 Allow mutating a module-qualified function's first argument if it is a variable. 2020-07-08 13:06:00 +08:00
Stephen Chung
ff6d205c1d Make Modules::set_raw_fn public. 2020-07-07 22:59:23 +08:00
Stephen Chung
a2c0554f3c Make consistent style. 2020-07-06 21:52:07 +08:00
Stephen Chung
f5ff759fcc Merge branch 'master' of https://github.com/schungx/rhai 2020-07-06 21:31:03 +08:00
Alvin Wong
4a3a32dc3a Fix serializing externally-tagged enum representations 2020-07-06 21:11:41 +08:00
Alvin Wong
4b6afc9c72 Add enum serialization tests 2020-07-06 18:32:22 +08:00
Alvin Wong
0644c67252 Impl. deserializing enum representations 2020-07-06 18:32:22 +08:00
Stephen Chung
46cdec1280 Refine docs and tests. 2020-07-06 16:20:03 +08:00
Alvin Wong
8f53ce50d4 Ensure rhai::INT can be deserialized into any integer types 2020-07-06 15:30:56 +08:00
Stephen Chung
3e45d5d9a5 Refine docs and API. 2020-07-06 13:01:57 +08:00
Stephen Chung
ea86888638 Add new &Module parameter to native functions. 2020-07-06 12:04:02 +08:00
Stephen Chung
a27f89b524 Add new register_fn_raw API. 2020-07-05 23:08:44 +08:00
Stephen Chung
e390dd73e6 Add custom operators. 2020-07-05 17:41:45 +08:00
Stephen Chung
936a3ff44a Add feature to disable symbols. 2020-07-05 15:23:51 +08:00
Stephen Chung
78c94daf46 Add ser::to_dynamic. 2020-07-03 22:42:56 +08:00
Stephen Chung
fa84e5c502 Add serde deserialization. 2020-07-03 17:19:55 +08:00
Stephen Chung
1b7ffdf408 Better type display. 2020-07-03 10:45:01 +08:00
Stephen Chung
760c13d36e Fix features. 2020-07-01 22:21:43 +08:00
Stephen Chung
e614790897 Enable function pointers even under no_function. 2020-06-30 18:34:58 +08:00
Stephen Chung
d6a08be223 Refactor. 2020-06-29 23:55:28 +08:00
Stephen Chung
aac04a5e53 Remove modules from Scope and use separate stack. 2020-06-27 23:56:24 +08:00
Stephen Chung
f3bde843cb Fix scripts and tests. 2020-06-27 21:19:53 +08:00
Stephen Chung
175c3ccaec OOP support. 2020-06-26 10:39:18 +08:00