Commit Graph

61 Commits

Author SHA1 Message Date
Stephen Chung
f49ce33a88 Use .take instead of mem::take(). 2023-04-21 10:20:19 +08:00
Mathieu Lala
9af5b1c78e
fix: default clippy lints 2022-12-30 18:07:39 +01:00
Stephen Chung
e2bd0705b1 Refine auto_restore syntax. 2022-12-04 22:47:10 +08:00
Stephen Chung
d151c87687 Change call_fn_raw to call_fn_with_options. 2022-11-21 23:42:29 +08:00
Stephen Chung
1c7b80ed13 Use turbofish for impl Trait. 2022-08-12 22:48:15 +08:00
Stephen Chung
d8532b48b6 Add function pointer short-hand. 2022-08-05 23:30:44 +08:00
Stephen Chung
b9cbeb65d6 Use Option instead of once/empty. 2022-06-11 16:01:15 +08:00
Stephen Chung
f8cee0fe4e Simplify using .. 2022-02-08 09:02:15 +08:00
Stephen Chung
5729f0cdd4 Add test for call_fn_raw. 2021-12-19 23:22:14 +08:00
Stephen Chung
c7ec27acc7 Split AST into separate files. 2021-12-17 16:07:13 +08:00
Stephen Chung
ba0a6c667e Add FnPtr::call_within_context. 2021-11-29 12:43:59 +08:00
Stephen Chung
dca47d5233 Remove volatile warnings for types and functions exposed unter internals. 2021-11-28 22:03:02 +08:00
Stephen Chung
de906053ed Deprecate call_fn_dynamic into call_fn_raw. 2021-11-15 11:13:00 +08:00
Stephen Chung
b091fea17b Add event handler test. 2021-10-16 13:59:12 +08:00
Stephen Chung
a530fbf4ff Remove unnecessary raw stirngs. 2021-06-05 15:26:43 +08:00
Stephen Chung
0f66c67f82 Do not unnecessarily use raw strings. 2021-04-20 12:01:35 +08:00
Stephen Chung
0807c474a1 Revise using string interpolation. 2021-04-04 23:22:45 +08:00
Stephen Chung
1200ffcd2b Add test with &str parameter. 2021-03-17 22:32:22 +08:00
Stephen Chung
d0922adb5b Deprecate RegisterFn and RegisterResultFn. 2021-03-15 11:36:30 +08:00
Stephen Chung
061fce1f02 No more pub_only. 2021-03-01 15:39:49 +08:00
Stephen Chung
f76daadcba Refine FuncArgs trait. 2021-01-28 15:29:55 +08:00
Stephen Chung
dc4e52e795 Code enhancements. 2020-12-26 13:05:57 +08:00
Stephen Chung
c6ef2d1e95 Add test to make sure call_fn does not pollute scope. 2020-11-06 13:41:04 +08:00
Stephen Chung
a9fd0ff4de Encapsulate scope into EvalContext;
Fix bug with custom syntax delta.
2020-10-19 19:11:55 +08:00
Stephen Chung
82e6dd446a Encapsulate register_fn_raw parameters into NativeCallContext. 2020-10-18 17:02:17 +08:00
Stephen Chung
0ece75aba3 Allow module access in closures. 2020-08-22 22:44:24 +08:00
Stephen Chung
f016655414 Simply test error matching. 2020-08-08 16:03:14 +08:00
Stephen Chung
dd0177f588 Allow deprecated API. 2020-08-03 10:07:52 +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
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
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
e8b6d0143d Small fixups. 2020-07-20 23:23:12 +08:00
Stephen Chung
d119e13b79 Allow binding of this pointer in FnPtr calls. 2020-07-17 10:18:07 +08:00
Stephen Chung
adc96e24bd Fix all features. 2020-07-13 19:38:50 +08:00
Stephen Chung
ff6d205c1d Make Modules::set_raw_fn public. 2020-07-07 22:59:23 +08:00
Stephen Chung
46cdec1280 Refine docs and tests. 2020-07-06 16:20:03 +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
1adf3cc39a Support for trailing commas. 2020-06-16 22:14:46 +08:00
Stephen Chung
5275778952 Add test to call_fn with String parameter. 2020-06-12 18:46:36 +08:00
Stephen Chung
9d91349513 Refine position display in error messages. 2020-06-12 18:04:16 +08:00
Stephen Chung
d613764c03 Test for private functions. 2020-05-13 13:49:01 +08:00
Stephen Chung
69733688bf Make all public API's return Box<EvalAltResult> to reduce footprint. 2020-04-21 23:25:12 +08:00
Stephen Chung
3609150dcf Bump version to 0.12.0. 2020-04-09 18:45:49 +08:00