Commit Graph

423 Commits

Author SHA1 Message Date
Stephen Chung
e505a06839 Add comparison operators to ImmutableString. 2020-07-30 13:28:25 +08:00
Stephen Chung
afbcd0fc0b Replace StaticVec with SmallVec. 2020-07-29 16:10:06 +08:00
Stephen Chung
b63ff56e09 Make sure we keep the starting position of each statement (for future uses). 2020-07-28 10:26:20 +08: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
6b600704a3 Avoid warnings. 2020-07-26 15:53:22 +08:00
Stephen Chung
353df6bea1 Avoid warnings in standard build. 2020-07-26 10:03:59 +08:00
Stephen Chung
c825de6f77 Mark internal data structures with [INTERNALS]. 2020-07-25 16:05:08 +08:00
Stephen Chung
6a96be3382 Merge branch 'master' of https://github.com/jonathandturner/rhai 2020-07-25 15:58:37 +08:00
Stephen Chung
284e58e8a1 Improve documentation on internal types. 2020-07-25 15:52:27 +08:00
John-John Tedro
d920613d57 Avoid shadowing call errors in get_indexed_mut 2020-07-25 08:13:11 +02:00
Stephen Chung
463d669ab5 Avoid shadowing indexer errors. 2020-07-25 09:55:33 +08:00
Stephen Chung
2b0aacde23 Fix Module::set_indexer_set_fn. 2020-07-24 23:16:54 +08:00
Stephen Chung
bff266d4e1 Move function calling to separate source file. 2020-07-23 18:40:42 +08:00
Stephen Chung
b913b521dc Improve currying. 2020-07-23 10:12:51 +08: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
61a1355c59 Add no-std example. 2020-07-21 22:32:24 +08:00
Stephen Chung
e6c3f8134d Avoid copying property name for map property access. 2020-07-21 20:59:12 +08:00
Stephen Chung
e8b6d0143d Small fixups. 2020-07-20 23:23:12 +08:00
Stephen Chung
cf36dc5a57 Support for anonymous functions. 2020-07-19 17:14:55 +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
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
f36b4a69ae FIXED - method calls inside dot chain. 2020-07-09 22:21:07 +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
d0711394f0 Expose FnPtr and move name checking into 2020-07-06 21:30:35 +08:00
Stephen Chung
d9fe6a1980 Add boolean xor operator and readjust % precedence. 2020-07-06 12:24:28 +08:00
Stephen Chung
ea86888638 Add new &Module parameter to native functions. 2020-07-06 12:04:02 +08:00
Stephen Chung
4052ad3df1 Assignments return () and no compound assignments. 2020-07-05 23:07:02 +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
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
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
d6a08be223 Refactor. 2020-06-29 23:55:28 +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
175c3ccaec OOP support. 2020-06-26 10:39:18 +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
3b1719e0bc Introduce ChainType to prepare for more chaining operators. 2020-06-23 17:36:07 +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
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
dc540755e7 Revert plugins. 2020-06-16 09:40:31 +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
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
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
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
d03f6ed983 Merge branch 'master' into plugins 2020-06-11 22:45:20 +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
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
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
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
cec6748ac6 Remove no_module gates to prepare for plugins. 2020-06-01 10:58:14 +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
c9de37e8d1 Hash functions only once via custom hasher. 2020-05-31 00:02:23 +08:00
Stephen Chung
2bcc51cc45 Fix bug in index expressions. 2020-05-30 10:27:48 +08:00
Stephen Chung
e1242df5c8 Extract copy/restore of first argument in method call. 2020-05-29 18:15:58 +08:00
Stephen Chung
9616452c00 Fix bug in calling script function in method style. 2020-05-29 00:53:30 +08:00
Stephen Chung
acd4685145 Convert function calls to method calls to use &mut first argument. 2020-05-28 23:57:09 +08:00
Stephen Chung
e84d4a88e9 Do not check function call depth if no_function. 2020-05-28 14:08:07 +08:00
Stephen Chung
0b259d0062 Move += for ImmutableString to Engine. 2020-05-28 10:33:28 +08:00
Stephen Chung
854634afa0 Allow native overriding implementation of assignment operators. 2020-05-27 13:22:10 +08:00
Stephen Chung
27c7cc4af7 Fix syntax error. 2020-05-26 23:05:21 +08:00
Stephen Chung
b34d5fe3a1 Complete ImmutableString. 2020-05-26 14:14:03 +08:00
Stephen Chung
95e67c48bd Optimize op-assignment statement. 2020-05-25 20:14:31 +08:00
Stephen Chung
fca140ef55 Refine immutable strings. 2020-05-25 17:01:39 +08:00
Stephen Chung
99ea2b33c9 Use immutable strings. 2020-05-25 13:44:28 +08:00
Stephen Chung
fd6dad0253 Remove builtin check. 2020-05-24 23:42:16 +08:00
Stephen Chung
0374311cf6 Optimize hot path of operators calling. 2020-05-24 16:40:00 +08:00
Stephen Chung
1798d4d6a0 Fix function call optimizations. 2020-05-24 11:57:46 +08:00