Commit Graph

1906 Commits

Author SHA1 Message Date
Stephen Chung
6c07d5fd73 Fix constant example. 2020-11-21 14:46:05 +08:00
Stephen Chung
082ca81c30
Merge pull request #295 from schungx/master
Update comments with links, do loops and fix custom syntax variables searching.
2020-11-21 14:28:29 +08:00
Stephen Chung
2be757fda0 Make shadowing variables in custom syntax work. 2020-11-21 13:05:57 +08:00
Stephen Chung
b1ad0695b4 Make shadowing variables in custom syntax work. 2020-11-21 12:28:04 +08:00
Stephen Chung
17cd305af7 Restore previous always_search when exiting block. 2020-11-21 12:25:39 +08:00
Stephen Chung
6069a4cf55 do loop. 2020-11-20 22:23:37 +08:00
Stephen Chung
b34e7840b0 Fix serde build 2020-11-20 21:07:31 +08:00
Stephen Chung
783803ec46 Update comments with links. 2020-11-20 16:52:28 +08:00
Stephen Chung
2afcecc6ba Fix benchmark. 2020-11-20 10:35:25 +08:00
Stephen Chung
15afd83da5 Merge Expr::True/False into BoolConstant. 2020-11-19 22:29:50 +08:00
Stephen Chung
b87fa87a75 Fix internals. 2020-11-19 14:08:58 +08:00
Stephen Chung
5e4ede6f07 global_module -> global_namespace. 2020-11-19 13:56:03 +08:00
Stephen Chung
a00d6ba99e Optimize IndexChainValue usage. 2020-11-19 13:51:59 +08:00
Stephen Chung
0e4743e7c7 Share environment when making module from AST. 2020-11-19 10:52:45 +08:00
Stephen Chung
1de85d749d Optimize AST. 2020-11-19 10:41:08 +08:00
Stephen Chung
d35a7eeaa8 Optimize PackagesCollection. 2020-11-19 10:24:43 +08:00
Stephen Chung
a8cdb661f8 Optimize Imports. 2020-11-19 10:14:43 +08:00
Stephen Chung
21c641d21f Set namespace in Module::set_fn_XXX_mut calls. 2020-11-17 15:11:58 +08:00
Stephen Chung
863c6b45a5 Fine tune codegen for global exports. 2020-11-17 14:29:28 +08:00
Stephen Chung
e98e9f9b78
Merge pull request #294 from schungx/master
#[rhai_fn(global)]
2020-11-17 13:22:21 +08:00
Stephen Chung
bd094d95b4 Fix codegen doc error. 2020-11-17 13:11:31 +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
a19865d811 Add global/internal parameters to rhai_fn. 2020-11-17 12:09:56 +08:00
Stephen Chung
999a87f86e Fix no_optimize build. 2020-11-16 23:32:44 +08:00
Stephen Chung
7ef3bd6b20 Fix no_function build. 2020-11-16 23:25:19 +08:00
Stephen Chung
699220057f Fix bug. 2020-11-16 23:17:34 +08:00
Stephen Chung
272c8505b8 Refactor use. 2020-11-16 23:10:14 +08:00
Stephen Chung
d50d48f26f Move definition of Array and Map to lib.rs. 2020-11-16 21:14:32 +08:00
Stephen Chung
b21d5e6cee
Merge pull request #293 from schungx/master
Add Engine::register_module.
2020-11-16 16:54:18 +08:00
Stephen Chung
adb902326e Reduce feature gates on imports. 2020-11-16 16:28:04 +08:00
Stephen Chung
ef02150afd Expose methods for Engine::register_module. 2020-11-16 14:07:48 +08:00
Stephen Chung
cd62104296 More Dynamic constants. 2020-11-16 13:56:07 +08:00
Stephen Chung
b6d35ab310 Fix no_module build. 2020-11-16 09:30:17 +08:00
Stephen Chung
b75964e383 Add Dynamic::UNIT. 2020-11-15 23:14:29 +08:00
Stephen Chung
937b45a187 Add Engine::load_module. 2020-11-15 23:14:16 +08:00
Stephen Chung
fbe9425794 Add discriminant to Dynamic::hash. 2020-11-15 18:39:23 +08:00
Stephen Chung
c919ee4e46 Fine tune hash map sizes. 2020-11-15 13:49:54 +08:00
Stephen Chung
bde8917ed4 Set capacity of hash maps. 2020-11-15 12:07:35 +08:00
Stephen Chung
a63f14b59c Expr::Switch -> Stmt::Switch. 2020-11-14 23:43:36 +08:00
Stephen Chung
0182117759 Change Stmt Variant names. 2020-11-14 22:55:23 +08:00
Stephen Chung
fce2c62f02 Reformat code files. 2020-11-14 22:43:56 +08:00
Stephen Chung
eb49a4b40a Speed up switch benches. 2020-11-14 19:23:10 +08:00
Stephen Chung
28de155f08 Add Expr::DynamicConstant. 2020-11-14 19:04:49 +08:00
Stephen Chung
c104afbdce Fix switch test. 2020-11-14 18:30:26 +08:00
Stephen Chung
89254a04c4 Fix tests. 2020-11-14 17:22:01 +08:00
Stephen Chung
56fbe39b7b Use references for switch expressions, if possible. 2020-11-14 16:08:48 +08:00
Stephen Chung
83c7c101d1 Add docs and tests for switch. 2020-11-14 09:38:16 +08:00
Stephen Chung
b0c66eb5e5 Add benchmarks for switch statement. 2020-11-13 19:35:51 +08:00
Stephen Chung
4f4626cc25
Merge pull request #292 from schungx/master
Switch expression.
2020-11-13 19:25:58 +08:00