Commit Graph

  • 560da5fdc6 Allow call_fn with only one parameter; consume can retain functions, eval cannot. Stephen Chung 2020-03-12 14:54:14 +08:00
  • e24d3a7ade Allow overloading of script functions. Stephen Chung 2020-03-12 13:02:13 +08:00
  • 1765d302b9 Minor refactor. Stephen Chung 2020-03-12 12:40:28 +08:00
  • 66edd28fb3 Do not optimize AST for dump_ast. Stephen Chung 2020-03-12 12:39:33 +08:00
  • 4662b9bd0c Fine tune some tests. Stephen Chung 2020-03-12 12:35:30 +08:00
  • 0d1a240292 Expand range function to cover all integer types. Stephen Chung 2020-03-12 12:32:26 +08:00
  • a02c0cfaa0 More optimizations. Stephen Chung 2020-03-11 23:43:10 +08:00
  • 952932f64c Reduce cloning. Stephen Chung 2020-03-11 23:43:04 +08:00
  • dbfc38763a Merge branch 'min-build' Stephen Chung 2020-03-11 14:43:25 +08:00
  • fbb0808884 Merge branch 'master' of https://github.com/schungx/rhai Stephen Chung 2020-03-11 14:36:10 +08:00
  • defa29b28f Do not track .cargo. Stephen Chung 2020-03-11 14:29:21 +08:00
  • 7c4d22d98a Add no_function feature to disable script-defined functions. Stephen Chung 2020-03-11 13:28:12 +08:00
  • 047f064cd1 Add dump_ast function for debugging. Stephen Chung 2020-03-11 11:39:15 +08:00
  • 880bce1114 General cleanup. Stephen Chung 2020-03-11 11:03:18 +08:00
  • 708c285a0a Add only_i32 and only_i64 features. Stephen Chung 2020-03-10 23:06:20 +08:00
  • e22aaca5c1 Make sure all tests run with all features. Stephen Chung 2020-03-10 19:48:47 +08:00
  • cc772c6e2a Add no_float feature to disable floating-point. Stephen Chung 2020-03-10 18:32:01 +08:00
  • 52b5732bcb Add no_inidex feature to disable arrays and indexing. Stephen Chung 2020-03-10 17:10:33 +08:00
  • f3bcb2a10d Simplify call_fn API, no need to pass &mut references. Stephen Chung 2020-03-10 14:09:05 +08:00
  • faf78ccdd3
    Merge pull request #105 from schungx/master Stephen Chung 2020-03-10 11:32:24 +08:00
  • 711cd9bb1c Improve repl and rhai_runner examples with error messages. Stephen Chung 2020-03-10 11:25:34 +08:00
  • 2d80ee2f18 Refine optimizer. Stephen Chung 2020-03-10 11:22:41 +08:00
  • feaad4e0da Group use of std under one root. Stephen Chung 2020-03-10 10:07:44 +08:00
  • bae9946291 Allow engine to retain functions across runs. Stephen Chung 2020-03-10 09:30:12 +08:00
  • 55e7af7b04 Add AST optimizer. Stephen Chung 2020-03-09 21:57:07 +08:00
  • c467ffd58d Comment out optimizer for successful build. Stephen Chung 2020-03-09 21:52:43 +08:00
  • 5b5fd162be Use ? operator in tests. Stephen Chung 2020-03-09 21:09:53 +08:00
  • 63482d5a79 Use ? operator for examples. Stephen Chung 2020-03-09 16:54:43 +08:00
  • 1ca9db4379 Fix i64.powi() to i64.pos() Stephen Chung 2020-03-09 14:15:32 +08:00
  • a6899afb11 Refine README. Stephen Chung 2020-03-09 12:53:07 +08:00
  • b9d562eba4 Add standard math functions and make power functions checked. Stephen Chung 2020-03-09 11:42:10 +08:00
  • e54fb54da2 Catch indexing errors at compile time. Stephen Chung 2020-03-09 10:41:17 +08:00
  • 01d04f717b Natively handle negative numbers in tokenizer instead of the neg() function. Stephen Chung 2020-03-09 10:10:19 +08:00
  • c5b40783ef Add unchecked feature to remove arithmetic operations checking. Stephen Chung 2020-03-08 23:14:18 +08:00
  • b1b25d3043 Add fallible functions support and replace most arithmetic operations with checked versions. Stephen Chung 2020-03-08 22:47:13 +08:00
  • 3e7adc2e51 More comments in code. Stephen Chung 2020-03-08 19:54:02 +08:00
  • daa581bac7 Add append to strings. Stephen Chung 2020-03-08 09:19:04 +08:00
  • a264abffa4 Allow arbitrary number of indexing in dot getter chain. Stephen Chung 2020-03-07 23:57:01 +08:00
  • eed7bef974 Allow chaining of indexing (one level) and dotting. Stephen Chung 2020-03-07 22:50:46 +08:00
  • df6950f8f7 Fix arrayindexed property access. Stephen Chung 2020-03-07 20:55:03 +08:00
  • d055638e83 Properly detect invalid assignment LHS at compile time. Stephen Chung 2020-03-07 17:32:15 +08:00
  • a8be700b9f Simplify op-assignment. Stephen Chung 2020-03-07 13:39:28 +08:00
  • 22cb69a16b Allow block expressions. Stephen Chung 2020-03-07 10:39:00 +08:00
  • 473e40e8a4 Catch more invalid LHS for assignments. Stephen Chung 2020-03-07 10:16:20 +08:00
  • 024133ae2d Avoid string copying. Stephen Chung 2020-03-07 10:15:42 +08:00
  • ea82ee81d6 Fix call_fn to take &ast instead of ast. Stephen Chung 2020-03-07 00:29:45 +08:00
  • c917aa0a5a Code cleanup. Stephen Chung 2020-03-06 23:49:52 +08:00
  • 80051805d1
    Merge pull request #104 from schungx/master Stephen Chung 2020-03-06 21:12:29 +08:00
  • be615cea27 Merge branches 'master' and 'master' of https://github.com/schungx/rhai Stephen Chung 2020-03-06 21:09:23 +08:00
  • d2296ab33b Allow dot operator on function results; change debug print info for function registration. Stephen Chung 2020-03-06 15:49:38 +08:00
  • cc39e559ae Change debug print info for function registration. Stephen Chung 2020-03-06 15:49:38 +08:00
  • 42fe5e8b95 Add documentation of call_fn to README. Stephen Chung 2020-03-06 11:26:58 +08:00
  • 07e396b3f5 Allow chaining of array indexing operations. Stephen Chung 2020-03-06 10:50:52 +08:00
  • d8ec7ed141 Rephrase error messages. Stephen Chung 2020-03-06 10:50:20 +08:00
  • c7801e1d7e Fix off-by-one error message on indexing. Stephen Chung 2020-03-06 09:55:00 +08:00
  • 3d3b939ba6 Simplify code, document logic, refactor and better error messages. Stephen Chung 2020-03-06 01:05:02 +08:00
  • 883f08c026 Enable more indexing expressions. Stephen Chung 2020-03-05 20:28:03 +08:00
  • c9395049e2 Remove no-std feature and rename stdlib to no_stdlib. Stephen Chung 2020-03-05 10:18:46 +08:00
  • 347f6d607a Add no-std and stdlib features. Stephen Chung 2020-03-04 23:44:32 +08:00
  • ba2aac4960 General code cleanup. Stephen Chung 2020-03-04 23:06:05 +08:00
  • bb56a7a843 Code refactor, bug fixes, code docs. Stephen Chung 2020-03-04 22:00:01 +08:00
  • b4d56accd4 Reverse commit fa13588f6927d7b5ef902d78cb47f8c798ea5b3d. Limit input script size not meaningful. Stephen Chung 2020-03-04 09:33:35 +08:00
  • b421c8ac50 Minor refactor. Stephen Chung 2020-03-03 23:31:29 +08:00
  • 3af421ae5f Fix problems with script-defined functions. Stephen Chung 2020-03-03 23:31:16 +08:00
  • 01bee6e16e Accept up to 20 parameters in functions. Stephen Chung 2020-03-03 23:17:42 +08:00
  • 71a3c79915 Fix number parsing. Stephen Chung 2020-03-03 21:39:25 +08:00
  • 9f80bf03c4 Add throw. Stephen Chung 2020-03-03 18:15:20 +08:00
  • e2cb111e4b Add type_of function. Stephen Chung 2020-03-03 17:28:38 +08:00
  • 71ec23e621 Minor code refactoring. Stephen Chung 2020-03-03 16:24:03 +08:00
  • 95d0b2e620 Better error messages for function definitions. Stephen Chung 2020-03-03 16:23:55 +08:00
  • a1591ae45b Better API for Scope. Stephen Chung 2020-03-03 15:20:20 +08:00
  • fa13588f69 Limit script size to avoid overflowing positions. Stephen Chung 2020-03-03 13:30:46 +08:00
  • 6969b13ebc Remove TODO in favor of tracking issue. Stephen Chung 2020-03-03 10:01:48 +08:00
  • 659d1f2583
    Merge pull request #98 from schungx/master Stephen Chung 2020-03-03 09:18:28 +08:00
  • 366188234b Pretty-print common type names. Stephen Chung 2020-03-02 23:16:19 +08:00
  • a4a9102fc5 Add remaining integer types. Stephen Chung 2020-03-02 22:32:08 +08:00
  • 0e96e1080c Comprehensive error line number/character position during evaluation. Stephen Chung 2020-03-02 22:13:14 +08:00
  • 0707fad1ca Refactor tests. Stephen Chung 2020-03-02 22:11:56 +08:00
  • ed8d2ac20f Add else if control flow. Stephen Chung 2020-03-02 17:04:56 +08:00
  • cc87214750 Simplify code. Stephen Chung 2020-03-02 17:04:45 +08:00
  • 103c62fb43 Include io::Error in file API's. Stephen Chung 2020-03-02 16:29:50 +08:00
  • 318bf97986 Bump version to 0.10.1. Stephen Chung 2020-03-02 15:20:29 +08:00
  • 710a07d896 Refactor some examples. Stephen Chung 2020-03-02 15:19:59 +08:00
  • adaa65f953 Allow script functions to override built-in functions. Stephen Chung 2020-03-02 15:19:41 +08:00
  • a5e09295f8 Allow comparisons between different types (returning false). Stephen Chung 2020-03-02 14:28:42 +08:00
  • 22a505b57b Short-curcuit boolean operators. Stephen Chung 2020-03-02 12:08:03 +08:00
  • bedfe55005 Minor code refactoring. Stephen Chung 2020-03-02 00:11:00 +08:00
  • a64b01692b Use impl Fn style. Stephen Chung 2020-03-01 19:26:57 +08:00
  • b152ed88f0 Move built-in functions into separate module. Stephen Chung 2020-03-01 17:37:47 +08:00
  • e93fd7d3fe Properly handle char types. Stephen Chung 2020-03-01 13:30:22 +08:00
  • 5f135353c0 Change precedence to i8. Stephen Chung 2020-02-29 21:18:48 +08:00
  • 17f0001b11 Fix string handling - error for unterminated strings. Stephen Chung 2020-02-29 21:10:31 +08:00
  • 4b3cf95871 Simplify position handling. Stephen Chung 2020-02-29 20:12:10 +08:00
  • c9daab3754 Simplify code by removing redirections. Stephen Chung 2020-02-29 17:10:51 +08:00
  • 8723eedca9 Rename RegisterBoxFn to RegisterDynamicFn. Stephen Chung 2020-02-28 23:38:39 +08:00
  • 8128c0cf24 Add pad and truncate array functions. Stephen Chung 2020-02-25 16:23:59 +08:00
  • 80a9abada6 Introduce to_int and to_float conersion functions. Stephen Chung 2020-02-25 15:02:50 +08:00
  • 51abc4a2c1 Simplify API by introducing the Dynamic and Array type aliases. Stephen Chung 2020-02-25 15:02:27 +08:00
  • 2e296ff9d7 Fix MarkDown style. Stephen Chung 2020-02-25 15:01:50 +08:00
  • 7893a9734b Minor fixes to README. Stephen Chung 2020-02-25 11:23:46 +08:00