Commit Graph

43 Commits

Author SHA1 Message Date
Stephen Chung
56df5c49c8 Encapsulate FunctionsLib to hold script-defined functions. 2020-03-26 20:26:05 +08:00
Stephen Chung
8679982b4b Use references for function call args. 2020-03-26 10:56:28 +08:00
Stephen Chung
2bb2e871ab Remove regnster_fn support for first argument of &type (not used). 2020-03-25 17:21:58 +08:00
Stephen Chung
180c4dee08 Document macros. 2020-03-25 11:24:06 +08:00
Stephen Chung
d21f66b911 Fixing lint warnings 2020-03-24 16:57:35 +08:00
Stephen Chung
cc8ec12691 Add more comments and examples. 2020-03-19 13:52:10 +08:00
Stephen Chung
0dc51f8e59 Removee debug_msgs feature. 2020-03-18 22:03:50 +08:00
Stephen Chung
a9c65a962c Split no_stdlib and no_std into two features. 2020-03-18 12:04:26 +08:00
Trangar
c8a9df0a0a Added no_std support 2020-03-17 19:26:11 +01:00
Stephen Chung
f80e499e84 Minor code cleanup. 2020-03-14 23:41:21 +08:00
Stephen Chung
880bce1114 General cleanup. 2020-03-11 11:03:18 +08:00
Stephen Chung
5b5fd162be Use ? operator in tests. 2020-03-09 21:09:53 +08:00
Stephen Chung
b1b25d3043 Add fallible functions support and replace most arithmetic operations with checked versions. 2020-03-08 22:47:13 +08:00
Stephen Chung
3e7adc2e51 More comments in code. 2020-03-08 19:54:02 +08:00
Stephen Chung
ba2aac4960 General code cleanup. 2020-03-04 23:06:05 +08:00
Stephen Chung
bb56a7a843 Code refactor, bug fixes, code docs. 2020-03-04 22:00:01 +08:00
Stephen Chung
3af421ae5f Fix problems with script-defined functions. 2020-03-03 23:31:16 +08:00
Stephen Chung
01bee6e16e Accept up to 20 parameters in functions. 2020-03-03 23:17:42 +08:00
Stephen Chung
71ec23e621 Minor code refactoring. 2020-03-03 16:24:03 +08:00
Stephen Chung
0e96e1080c Comprehensive error line number/character position during evaluation. 2020-03-02 22:13:14 +08:00
Stephen Chung
a5e09295f8 Allow comparisons between different types (returning false). 2020-03-02 14:28:42 +08:00
Stephen Chung
22a505b57b Short-curcuit boolean operators. 2020-03-02 12:08:03 +08:00
Stephen Chung
8723eedca9 Rename RegisterBoxFn to RegisterDynamicFn. 2020-02-28 23:38:39 +08:00
Stephen Chung
51abc4a2c1 Simplify API by introducing the Dynamic and Array type aliases. 2020-02-25 15:02:27 +08:00
Stephen Chung
157aa2be94 Add for statement and range function; New register_box_fn for functions returning Box<dyn Any> (which should not be boxed again); Register standard utility functions in library (e.g. print, string concat). 2020-02-23 22:48:46 +08:00
timfish
82fd20b2b1 Rust 2018 2019-09-18 11:21:07 +01:00
torkleyy
76a1e3056b Add better funcion call syntax 2017-12-20 22:16:53 +01:00
torkleyy
71ebd0d4d1 Use &mut Any instead of &mut Box<Any> 2017-12-20 21:52:26 +01:00
torkleyy
a0fb5036f6 Minor tweaks, fix bug 2017-12-20 16:32:04 +01:00
torkleyy
f09545921f Rewrite Rhai function dispatching 2017-12-20 12:16:14 +01:00
Lukáš Hozda
9448c19581 fix version in README, continue documenting 2017-10-30 13:08:40 +01:00
Lukáš Hozda
a1e92d006c clippy refactoring 2017-10-02 23:44:45 +02:00
jonathandturner
7a46c7d9bc Refactoring a bit of the string/char parser code. Fmt'd 2016-04-16 19:32:18 -07:00
jonathandturner
4e38b9e611 Clean up trailing space and fix rhai_runner print out 2016-04-13 18:01:08 -07:00
jonathandturner
b1ccaf4516 Add support for arrays 2016-03-26 10:46:28 -07:00
jonathandturner
254f4b081c Simplified function registration to not require explicit coercion step. Simplified eval to take &str instead of String 2016-03-16 18:07:08 -04:00
jonathandturner
fbb5b72f24 Add support for loop breaks and function returns 2016-03-03 09:31:42 -05:00
jonathandturner
a10b59d835 Refactor function lookup for better compile times and slightly cleaner code 2016-03-02 14:14:22 -05:00
jonathandturner
54279fd75f Add support for functions up to arity 6 2016-03-02 10:49:24 -05:00
jonathandturner
d8dd673459 Add support for functions declared in script 2016-03-01 20:45:02 -05:00
jonathandturner
a8fa76c2fc Support for methods. Started support for functions defined in script but not yet ready 2016-03-01 15:16:10 -05:00
jonathandturner
419781cfb6 Fill out support for operators 2016-03-01 09:40:48 -05:00
jonathandturner
6739706b64 Initial commit 2016-02-29 16:43:45 -05:00