Commit Graph

290 Commits

Author SHA1 Message Date
Stephen Chung
6d33a91d09 Fix minor floating-point digit error. 2020-03-16 12:40:55 +08:00
Stephen Chung
372321dfe3 Add full optimization level for aggressive optimizing. 2020-03-15 22:39:58 +08:00
Stephen Chung
6e076c409d Use matches! in examples. 2020-03-14 23:40:30 +08:00
Stephen Chung
dd36f3387a Fixup code to make sure all feature builds succeed. 2020-03-14 20:06:40 +08:00
Stephen Chung
26bdc8ba08 FIX - fixes panic when constant array is assigned to. Refine README section on constants. 2020-03-14 19:46:44 +08:00
Stephen Chung
9844ae8665 Add constants. 2020-03-13 18:12:41 +08:00
Stephen Chung
560da5fdc6 Allow call_fn with only one parameter; consume can retain functions, eval cannot. 2020-03-12 14:54:14 +08:00
Stephen Chung
e24d3a7ade Allow overloading of script functions. 2020-03-12 13:02:13 +08:00
Stephen Chung
4662b9bd0c Fine tune some tests. 2020-03-12 12:35:30 +08:00
Stephen Chung
7c4d22d98a Add no_function feature to disable script-defined functions. 2020-03-11 13:28:12 +08:00
Stephen Chung
880bce1114 General cleanup. 2020-03-11 11:03:18 +08:00
Stephen Chung
708c285a0a Add only_i32 and only_i64 features. 2020-03-10 23:06:20 +08:00
Stephen Chung
e22aaca5c1 Make sure all tests run with all features. 2020-03-10 19:48:47 +08:00
Stephen Chung
f3bcb2a10d Simplify call_fn API, no need to pass &mut references. 2020-03-10 14:09:05 +08:00
Stephen Chung
bae9946291 Allow engine to retain functions across runs. 2020-03-10 09:30:12 +08:00
Stephen Chung
5b5fd162be Use ? operator in tests. 2020-03-09 21:09:53 +08:00
Stephen Chung
01d04f717b Natively handle negative numbers in tokenizer instead of the neg() function. 2020-03-09 10:10:19 +08:00
Stephen Chung
c5b40783ef Add unchecked feature to remove arithmetic operations checking. 2020-03-08 23:14:18 +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
024133ae2d Avoid string copying. 2020-03-07 10:15:42 +08:00
Stephen Chung
ea82ee81d6 Fix call_fn to take &ast instead of ast. 2020-03-07 00:29:45 +08:00
Stephen Chung
bb56a7a843 Code refactor, bug fixes, code docs. 2020-03-04 22:00:01 +08:00
Stephen Chung
71a3c79915 Fix number parsing. 2020-03-03 21:39:25 +08:00
Stephen Chung
9f80bf03c4 Add throw. 2020-03-03 18:15:20 +08:00
Stephen Chung
e2cb111e4b Add type_of function. 2020-03-03 17:28:38 +08:00
Stephen Chung
a1591ae45b Better API for Scope. 2020-03-03 15:20:20 +08:00
Stephen Chung
366188234b Pretty-print common type names. 2020-03-02 23:16:19 +08:00
Stephen Chung
0707fad1ca Refactor tests. 2020-03-02 22:11:56 +08:00
Stephen Chung
ed8d2ac20f Add else if control flow. 2020-03-02 17:04:56 +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
e93fd7d3fe Properly handle char types. 2020-03-01 13:30:22 +08:00
Stephen Chung
e4e471fd20 Add line/position in compilation errors; Add compile to AST; FIx infinite loop in close parens. 2020-02-24 23:25:52 +08:00
Stephen Chung
896579869c Fix test_mismatched_op. 2020-02-23 23:41:14 +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
4217e96d19 Remove unused enums and simplify test assertions 2019-10-09 12:06:32 +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
steve donovan
2bf3f5e957 better not-found error messages for variables and functions 2018-07-16 13:01:11 +02:00
Juan Ibiapina
e534e907e8 Use default rust directory structure for tests 2018-06-13 10:56:29 +02:00