Commit Graph

66 Commits

Author SHA1 Message Date
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
Stephen Chung
b2747b076e Add bouncs check to array index access. 2020-02-23 14:09:40 +08:00
Stephen Chung
829621a3d4 Trap array out-of-bound index access error. 2020-02-23 13:59:50 +08:00
timfish
4217e96d19 Remove unused enums and simplify test assertions 2019-10-09 12:06:32 +01:00
timfish
c34af7979a Format 2019-09-30 18:58:01 +01:00
timfish
53bb0a38f0 Use std::any::type_name 2019-09-30 18:57:21 +01:00
timfish
82fd20b2b1 Rust 2018 2019-09-18 11:21:07 +01:00
timfish
d7d0507f5a Fix readme and a couple of mis-named types? 2019-09-16 22:14:14 +01:00
David Kushner
0a11cadebf fix ambiguous calls to type_id preventing compilation on nightly 2019-04-17 13:28:14 -07:00
steve donovan
7ff1c39e01 Engine should be Clone 2018-07-22 17:06:13 +02:00
steve donovan
3fb2f543bb Engine::register_type_name for nice error messages for arbitrary types 2018-07-22 11:43:21 +02:00
steve donovan
2bf3f5e957 better not-found error messages for variables and functions 2018-07-16 13:01:11 +02:00
russ morris
2f46af64dd added unit type as () 2018-05-22 16:44:41 -07:00
Lukáš Hozda
8d07d8e00a lock debug messages behind 'debug_msgs' feature 2018-02-09 22:27:41 +01:00
Lukáš Hozda
ccc16f42f9 make engine clone-able 2017-12-31 19:58:50 +01:00
Lukáš Hozda
5edcfc2156 minor refactor 2017-12-21 12:28:59 +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
348a680980 Fix build and all tests 2017-12-20 21:09:53 +01:00
torkleyy
3672414212 Simplify and fix code 2017-12-20 17:37:12 +01:00
torkleyy
aec1fdcb78 Revert debugging changes 2017-12-20 16:39:03 +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
russ
3a5a1d2aff i64 and f64 exponent implementation 2017-11-23 23:56:22 -08:00
russ
4fed05c20a bugfix for binary and, modulo, binary ops tests 2017-10-31 15:06:13 -07:00
Lukáš Hozda [magnusi]
896c2f7a08
Merge pull request #43 from luciusmagn/master
fix version in README, continue documenting
2017-10-31 13:43:46 +01:00
russ
f1cd71a72b candidate compound assignment implementation 2017-10-30 22:55:20 -07:00
russ
e5e58fce98 sync'd latest master 2017-10-30 08:08:44 -07:00
Lukáš Hozda
9448c19581 fix version in README, continue documenting 2017-10-30 13:08:40 +01:00
Lukáš Hozda
47ce39062f initial documentation (WIP) 2017-10-28 22:33:00 +02:00
Lukáš Hozda
caf8a411aa impl loop and add tests for both unary operators and loops 2017-10-28 16:40:38 +02:00
Lukáš Hozda
679f0de6b6 implement unary + and -, add useful functions to Token 2017-10-28 16:08:24 +02:00
russ
01666cefb9 candidate f64 support 2017-10-27 20:30:12 -07:00
Lukáš Hozda
0b9865b24c add REPL example and consume functions 2017-10-15 17:50:39 +02:00
Lukáš Hozda
597c2eda21 move tests to a separated module for clarity, lock test module behind #[cfg(test)] 2017-10-14 19:49:18 +02:00
Lukáš Hozda
5bd2338f1c replace try!() with the more compact ? operator, compress operator functions to single lines 2017-10-02 23:51:04 +02:00
Lukáš Hozda
a1e92d006c clippy refactoring 2017-10-02 23:44:45 +02:00
Lukáš Hozda
660fbe2e39 [BREAKING CHANGE] change variable keyword to 'let' from 'var' 2017-10-02 08:46:35 +02:00
Jonathan Turner
2a28209b38 Add string concat/compare. Bump to 0.4 2016-08-17 18:33:31 -07:00
jonathandturner
7a46c7d9bc Refactoring a bit of the string/char parser code. Fmt'd 2016-04-16 19:32:18 -07:00
jonathandturner
b9ea072d6a Add support for character constants 2016-04-13 18:40:06 -07:00
jonathandturner
3364191781 Move to i64 by default 2016-04-13 18:05:44 -07:00
jonathandturner
4e38b9e611 Clean up trailing space and fix rhai_runner print out 2016-04-13 18:01:08 -07:00
jonathandturner
3dfc6e627d Move to using i64 by default 2016-04-12 19:52:27 -07:00
jonathandturner
d133a62fc6 Tidy up tests 2016-03-26 13:36:26 -07:00
jonathandturner
5ccfab87ce Fill out array support with get/set for indexes in more complex expressions 2016-03-26 13:32:20 -07:00
jonathandturner
b1ccaf4516 Add support for arrays 2016-03-26 10:46:28 -07:00
jonathandturner
ceadc0977f Add eval_file and get/set helpers 2016-03-17 08:45:48 -04:00
jonathandturner
65bf269843 Add error test case for mismatched args 2016-03-16 19:20:11 -04:00
jonathandturner
cfac566425 Remove unbox/cast step in eval 2016-03-16 18:32:05 -04:00