Commit Graph

85 Commits

Author SHA1 Message Date
Mathieu Lala
097fa1f4e3
Merge branch 'main' of github.com:Mathieu-Lala/rhai into fix/lint 2023-02-05 17:18:45 +01:00
Stephen Chung
62696853b4 Fix bug with parsing improper module separator. 2023-01-29 15:23:33 +08:00
Mathieu Lala
9af5b1c78e
fix: default clippy lints 2022-12-30 18:07:39 +01:00
Stephen Chung
b4529b6a64 Add storage API for NativeCallContext. 2022-11-07 16:19:10 +08:00
Stephen Chung
4100e6da64 Use ImmutableString for source. 2022-10-29 14:12:18 +08:00
Stephen Chung
204284f4f7 Add test to recreate NativeCallContext. 2022-08-26 16:20:23 +08:00
Stephen Chung
a9413dc570 Remove _result registration methods. 2022-08-22 22:16:26 +08:00
Stephen Chung
1c7b80ed13 Use turbofish for impl Trait. 2022-08-12 22:48:15 +08:00
Stephen Chung
5435fdb8c8 Fix tests. 2022-05-21 11:57:23 +08:00
Stephen Chung
9c1a49da0b Fix AST combine. 2022-05-21 11:31:15 +08:00
Stephen Chung
b23d64bec0 Fix bug with using self-contained AST with call_fn. 2022-05-05 21:34:15 +08:00
Stephen Chung
42f977862f Add Dynamic parameters to qualified function calls. 2022-04-08 16:42:53 +08:00
Stephen Chung
fefa633cf0 Add type alias support for plugin modules. 2022-03-19 09:43:18 +08:00
Stephen Chung
7686ca619a Use .. for (_). 2022-02-08 09:46:14 +08:00
Stephen Chung
f8cee0fe4e Simplify using .. 2022-02-08 09:02:15 +08:00
Stephen Chung
7b92a80c32 Fix encapsulated environment in module functions. 2022-01-30 17:27:13 +08:00
Stephen Chung
20baae71d4 Factor tuples into structs to aid in understanding. 2022-01-28 10:11:40 +08:00
Stephen Chung
d15470fd4b Change eval<()> to run. 2022-01-10 13:26:33 +08:00
Stephen Chung
ef14079c61 Add ranges. 2021-12-15 12:06:17 +08:00
Stephen Chung
68c0ee08c0 Reduce usage of Default::default() to make it easier to refactor. 2021-11-07 18:12:37 +08:00
Stephen Chung
180ad77224 Change Engine::consume_XXX to Engine::run_XXX. 2021-08-17 15:50:56 +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
4581943435 Remove public_only parameters. 2021-03-17 09:58:08 +08:00
Stephen Chung
e9f280f917 Deprecate Module::set_fn_XXX API. 2021-03-15 12:39:06 +08:00
Stephen Chung
4da5af8aae Do not flatten arguments passed by value. 2021-03-06 21:25:49 +08:00
Stephen Chung
65ef32af19 Calculate whether contains global functions during indexing. 2021-03-05 20:07:35 +08:00
Stephen Chung
2c8b15c740 Private global functions are still exposed. 2021-03-03 11:40:27 +08:00
Stephen Chung
ad250fc973 Recursive self-contained AST. 2021-01-09 16:52:22 +08:00
Stephen Chung
637f47d259 Split AST::set_source into set_source/clear_source. 2021-01-09 15:20:07 +08:00
Stephen Chung
0f1f6c4ad3 Add Engine::compile_to_self_contained. 2021-01-09 00:24:55 +08:00
Stephen Chung
ba7f8c6391 Propagate source info. 2020-12-30 21:12:51 +08:00
Stephen Chung
dc4e52e795 Code enhancements. 2020-12-26 13:05:57 +08:00
Stephen Chung
f55a56c6bc Engine::register_global_module and Engine::register_static_module must be passed shared Module. 2020-12-23 10:08:43 +08:00
Stephen Chung
15fb03218c Rename packages to global modules. 2020-12-22 23:45:14 +08:00
Stephen Chung
2955a4ab64 Fix unary operators binding. 2020-12-21 17:39:37 +08:00
Stephen Chung
21c641d21f Set namespace in Module::set_fn_XXX_mut calls. 2020-11-17 15:11:58 +08:00
Stephen Chung
df72d324ba Fix tests. 2020-11-17 12:40:12 +08:00
Stephen Chung
038e3c2554 Add FnNamespace for module functions. 2020-11-17 12:23:53 +08:00
Stephen Chung
ef02150afd Expose methods for Engine::register_module. 2020-11-16 14:07:48 +08:00
Stephen Chung
821e64adc4 Allow multiple exports. 2020-11-09 14:38:33 +08:00
Stephen Chung
487a073caf Fix recursive file import bug. 2020-11-08 23:00:03 +08:00
Stephen Chung
3485f9b00b Fix test. 2020-11-01 16:02:10 +08:00
Stephen Chung
a2e2b5e2ef Add f32_float feature. 2020-11-01 15:48:48 +08:00
Stephen Chung
d88adfd73d Fix test. 2020-10-16 21:26:38 +08:00
Stephen Chung
f995d09d8b Fix bug with calling scripted function. 2020-10-16 21:16:06 +08:00
Stephen Chung
eec3f4e1bf Module:;eval_ast_as_new defaults to merging namespaces. 2020-10-03 11:42:54 +08:00
Stephen Chung
2fd30321a8 Fix test. 2020-10-02 15:31:59 +08:00
Stephen Chung
d2c94ba07c Add more module tests. 2020-10-02 14:55:02 +08:00
Stephen Chung
e526b53b42 No need to merge module if empty. 2020-09-30 09:57:21 +08:00