Commit Graph

620 Commits

Author SHA1 Message Date
Stephen Chung
936a3ff44a Add feature to disable symbols. 2020-07-05 15:23:51 +08:00
Stephen Chung
368b4a480b Reformat code. 2020-07-04 22:53:00 +08:00
Stephen Chung
d626bf9f5b Refine no_function feature. 2020-07-04 16:21:15 +08:00
Stephen Chung
b3b3a083b8 Add docs on serde feature. 2020-07-04 15:39:40 +08:00
Stephen Chung
2b2deba5e0 Remove serde from default feature. 2020-07-03 22:48:33 +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
bdc7b69266 Remove feature gate for Instant. 2020-07-02 22:16:09 +08:00
Stephen Chung
9c9f550200 Minor refactor. 2020-07-02 21:46:08 +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
52ef223f83 Fix pad functions. 2020-06-30 18:34:32 +08:00
Stephen Chung
d6a08be223 Refactor. 2020-06-29 23:55:28 +08:00
Stephen Chung
063851a6ad Merge branch 'tokenizer' 2020-06-28 15:51:37 +08:00
Stephen Chung
527d41d0e3 No modules in scope. 2020-06-28 15:49:24 +08:00
Stephen Chung
aac04a5e53 Remove modules from Scope and use separate stack. 2020-06-27 23:56:24 +08:00
Stephen Chung
549ef6bf7f Add oop.rhai script. 2020-06-27 17:34:39 +08:00
Stephen Chung
04d2fb5001 Fix no_std. 2020-06-26 23:24:47 +08:00
Stephen Chung
ab347fa14e Add Module::iter_script_fn. 2020-06-26 22:33:27 +08:00
Stephen Chung
74c82bbd9c Refactor. 2020-06-26 22:03:21 +08:00
Stephen Chung
8c632ed928 Remove println. 2020-06-26 19:54:12 +08:00
Stephen Chung
31eaf321d0 Refactor tokenizer. 2020-06-26 19:44:50 +08:00
Stephen Chung
175c3ccaec OOP support. 2020-06-26 10:39:18 +08:00
Stephen Chung
580a62daaf Add sign function. 2020-06-25 19:19:16 +08:00
Stephen Chung
fe640e0e13 Implement function pointers. 2020-06-25 18:07:57 +08:00
Stephen Chung
58c198776f Code cleanup. 2020-06-25 11:07:46 +08:00
Stephen Chung
ab60c2e1d2 Add scope command to repl. 2020-06-24 22:45:34 +08:00
Stephen Chung
d5eb2887ff Refactor Dynamic. 2020-06-23 19:24:26 +08:00
Stephen Chung
3b1719e0bc Introduce ChainType to prepare for more chaining operators. 2020-06-23 17:36:07 +08:00
Stephen Chung
54c5c139f9 Add internals feature. 2020-06-23 10:43:24 +08:00
Stephen Chung
a9b168ba99 Refine docs. 2020-06-22 22:02:49 +08:00
Stephen Chung
7cc1a3f5dc Change Map keys to ImmutableString to facilitate fast keys(). 2020-06-21 16:37:05 +08:00
Stephen Chung
ffe0c559be Remove scope parameter from ModuleResolver::resolve. 2020-06-20 21:49:45 +08:00
Stephen Chung
478bc7ab30 Change README to point to the Rhai book. 2020-06-20 12:23:32 +08:00
Stephen Chung
cc57a2344e Fix doc test. 2020-06-20 10:49:15 +08:00
Stephen Chung
35fa61cd4b Do not export fn_native. 2020-06-18 18:39:28 +08:00
Stephen Chung
2a73841549 Add support for Instant for wasm32. 2020-06-17 16:50:57 +08:00
Stephen Chung
ae6d5e13a9 Gate i128/u128 for wasm32 target. 2020-06-17 16:50:46 +08:00
Stephen Chung
e095a87ea2 Remove wasm64 target. 2020-06-17 16:49:51 +08:00
Stephen Chung
84fbcb03b3 Add WASM section. 2020-06-17 15:45:11 +08:00
Stephen Chung
7f4f737ff2 Gate WASM target. 2020-06-17 09:54:17 +08:00
Stephen Chung
b6e1f652b6 Fix bug when setting character in string via a method call. 2020-06-16 23:49:11 +08:00
Stephen Chung
151cd1af48 Support compiling to WASM. 2020-06-16 23:47:31 +08:00
Stephen Chung
1adf3cc39a Support for trailing commas. 2020-06-16 22:14:46 +08:00
Stephen Chung
dc540755e7 Revert plugins. 2020-06-16 09:40:31 +08:00
Stephen Chung
29044cc305 Merge branch 'plugins' 2020-06-16 09:36:47 +08:00
Stephen Chung
ff37e02443 Add iterator support for strings. 2020-06-16 09:34:30 +08:00
Stephen Chung
4603f8026f Add getters for Engine setting fields. 2020-06-15 23:20:50 +08:00
Stephen Chung
fcb5059570 Do not check for data oversize when unchecked. 2020-06-15 22:04:14 +08:00
Stephen Chung
9bd2d4c981 Merge branch 'master' into plugins 2020-06-15 21:52:15 +08:00
Stephen Chung
a417bdd8e3 Support registering functions with a reference to the scripting engine. 2020-06-15 21:49:02 +08:00
Stephen Chung
31d2fa410b Streamline code. 2020-06-14 22:44:59 +08:00
Stephen Chung
f26c12b8ea Better error messages for unrecognized tokens. 2020-06-14 19:13:11 +08:00
Stephen Chung
0c6a939c66 Better convert LexError to ParseError. 2020-06-14 16:56:36 +08:00
Stephen Chung
bb691a0313 Add maximum data size limits. 2020-06-14 14:25:47 +08:00
Stephen Chung
27ad7bbebe Merge branch 'master' into plugins 2020-06-14 00:14:52 +08:00
Stephen Chung
22d30c95c9 Add maximum data size limits. 2020-06-14 00:09:16 +08:00
Stephen Chung
f004575590 Fix namespace error in no_std. 2020-06-13 17:03:49 +08:00
Stephen Chung
b24fdd7a4d Change call_fn_dynamic to accept any type that is IntoIterator<Item=Dynamic>. 2020-06-12 19:54:55 +08:00
Stephen Chung
96e5a1c56d Merge branch 'master' into plugins 2020-06-12 18:04:30 +08:00
Stephen Chung
9d91349513 Refine position display in error messages. 2020-06-12 18:04:16 +08:00
Stephen Chung
6cc27eb9f4 Better error messages. 2020-06-11 23:21:39 +08:00
Stephen Chung
d92613eaf6 Fix parse positions. 2020-06-11 23:08:00 +08:00
Stephen Chung
d03f6ed983 Merge branch 'master' into plugins 2020-06-11 22:45:20 +08:00
Stephen Chung
e4cca7620f Better debug formatting for StaticVec. 2020-06-11 22:18:30 +08:00
Stephen Chung
8f55a15ab0 Collect parse settings into struct type. 2020-06-11 22:03:47 +08:00
Stephen Chung
0ac3a7d8b4 Use type alias TokenStream. 2020-06-11 18:13:33 +08:00
Stephen Chung
95f94a3348 Add strings example. 2020-06-09 12:21:21 +08:00
Stephen Chung
b4b835f80a Remove unnecessary "sync" feature gates. 2020-06-08 14:10:16 +08:00
Stephen Chung
a4cabc1ac7 Better String parameter error message. 2020-06-08 14:10:06 +08:00
Stephen Chung
d4ebb3c96d Merge branch 'master' into plugins 2020-06-08 10:26:51 +08:00
Stephen Chung
ead366aac8 Better String parameter error message. 2020-06-08 10:26:32 +08:00
Stephen Chung
5fb4b04cb0 Put type on transmute call. 2020-06-08 10:26:12 +08:00
Stephen Chung
e942ef358c Transparently convert &str to ImmutableString for register_fn. 2020-06-07 17:54:33 +08:00
Stephen Chung
6841beb351 Merge branch 'master' into plugins 2020-06-06 13:25:46 +08:00
Stephen Chung
5f40a1376a Implement index setters. 2020-06-06 13:06:00 +08:00
Stephen Chung
ea806ba100 Merge branch 'master' into plugins 2020-06-05 15:39:44 +08:00
Stephen Chung
56eb659d5a Unify all functions into CallableFunction type, remove FunctionsLib. 2020-06-05 15:14:42 +08:00
Stephen Chung
1442cc9b7a Merge branch 'master' into plugins 2020-06-03 11:15:55 +08:00
Stephen Chung
ec6e3daabb Refactor. 2020-06-03 10:44:36 +08:00
jhwgh1968
27b8f9929d Basic Implementation of Plugins and Plugin Functions 2020-06-02 21:44:28 -05:00
Stephen Chung
b8da1691d3 Consolidate callbacks. 2020-06-02 13:33:16 +08:00
Stephen Chung
b70d38e820 Avoid passing position until error. 2020-06-01 15:25:22 +08:00
Stephen Chung
a5d8ce2e49 Merge branch 'master' into plugins 2020-06-01 14:14:47 +08:00
Stephen Chung
b8b12055b9 Disable if-expression when parsing expressions. 2020-06-01 13:26:20 +08:00
Stephen Chung
6d190096fd Fix bug with bracket postfix when no_index. 2020-06-01 13:03:01 +08:00
Stephen Chung
8e876b0b86 Merge branch 'master' into plugins 2020-06-01 10:58:26 +08:00
Stephen Chung
cec6748ac6 Remove no_module gates to prepare for plugins. 2020-06-01 10:58:14 +08:00
Stephen Chung
c6e5f672c9 More benchmarks and examples. 2020-05-31 23:44:49 +08:00
Stephen Chung
840afe74bb Simplify eval_dot_index_chain. 2020-05-31 15:51:26 +08:00
Stephen Chung
d7d49a5196 Fix bug in chained dot/index expression. 2020-05-31 14:27:16 +08:00
Stephen Chung
76d792011f Add Engine::call_fn_dynamic. 2020-05-31 12:37:19 +08:00
Stephen Chung
5f727335a6 Add type info. 2020-05-31 12:36:42 +08:00
Stephen Chung
13c49387ef Add OptimizationLevel::is_simple 2020-05-31 12:36:31 +08:00
Stephen Chung
c9de37e8d1 Hash functions only once via custom hasher. 2020-05-31 00:02:23 +08:00
Stephen Chung
6924b62939 Merge branch 'master' into plugins 2020-05-30 13:51:54 +08:00
Stephen Chung
acd0f6b56b != defaults to true for different parameter types. 2020-05-30 13:49:40 +08:00
Stephen Chung
4c46c7e26b Register property versions of some methods. 2020-05-30 10:30:21 +08:00
Stephen Chung
666a618e40 Add register getter/setter/indexer to modules. 2020-05-30 10:28:17 +08:00