Commit Graph

  • 6308e54119 Simplify. Stephen Chung 2020-03-26 10:55:50 +08:00
  • a5a161ec88 Format getter/setter function name using constants. Stephen Chung 2020-03-26 10:55:33 +08:00
  • 2bb2e871ab Remove regnster_fn support for first argument of &type (not used). Stephen Chung 2020-03-25 17:21:58 +08:00
  • ff8756018b Refactor error display. Stephen Chung 2020-03-25 11:51:13 +08:00
  • b603a85bca Add expression eval test. Stephen Chung 2020-03-25 11:50:58 +08:00
  • 5aea997672 Refine Scope API. Stephen Chung 2020-03-25 11:27:18 +08:00
  • 3bc02a99ad Format comments. Stephen Chung 2020-03-25 11:27:09 +08:00
  • 599b81ad8a Remove ScopeEntry and VariableType from public. Stephen Chung 2020-03-25 11:24:29 +08:00
  • 180c4dee08 Document macros. Stephen Chung 2020-03-25 11:24:06 +08:00
  • 928f044553 Fix lint warnings in examples Stephen Chung 2020-03-24 17:30:04 +08:00
  • d21f66b911 Fixing lint warnings Stephen Chung 2020-03-24 16:57:35 +08:00
  • 3ea482567f Simplify code style. Stephen Chung 2020-03-24 16:46:47 +08:00
  • 156ebd7ea4 Avoid copying tokens. Stephen Chung 2020-03-24 11:21:20 +08:00
  • 7b06715299 FIX - Errors in no_std. Stephen Chung 2020-03-24 11:21:09 +08:00
  • 3677bd3651 Make Token smaller by boxing LexError. Stephen Chung 2020-03-24 09:49:37 +08:00
  • bcab024d22 Add info to pull directly from GitHub. Stephen Chung 2020-03-24 09:49:19 +08:00
  • 060a61fc9d Use INT in examples instead of i64. Stephen Chung 2020-03-24 09:49:08 +08:00
  • 8cb8b89474
    Merge pull request #114 from schungx/master Stephen Chung 2020-03-23 09:22:36 +08:00
  • 1b4bcbcfdf Add evaluate expressions. Stephen Chung 2020-03-22 21:03:58 +08:00
  • b6320c0eef Minor fine tuning. Stephen Chung 2020-03-22 10:18:16 +08:00
  • f51864e190 Allow line continuations in repl example. Stephen Chung 2020-03-22 09:25:41 +08:00
  • 3a2413c88f Add LICENSE. Stephen Chung 2020-03-22 00:32:07 +08:00
  • 0a959483bb
    Add LICENSE. Stephen Chung 2020-03-22 00:29:33 +08:00
  • b29c3ba6a9 Add multi-line support to repl example. Stephen Chung 2020-03-21 17:14:31 +08:00
  • dfb8f31256
    Merge pull request #112 from schungx/master Stephen Chung 2020-03-21 00:41:37 +08:00
  • bd6eb27154 Undo secion changes to README on optimization levels. Stephen Chung 2020-03-21 00:40:49 +08:00
  • 9c7fa97171
    Merge pull request #110 from schungx/master Stephen Chung 2020-03-21 00:27:38 +08:00
  • 083b3147be Fix test_eval. Stephen Chung 2020-03-21 00:23:13 +08:00
  • 1d98f65342 Disallow statement expressions in if and while guards to reduce code confusion. Stephen Chung 2020-03-20 19:50:58 +08:00
  • ed996e71d6 Enable dot operations on constant variables. Stephen Chung 2020-03-20 19:27:02 +08:00
  • 16ea8f416e Revise section on function side effects because Rhai functions cannot mutate state. Stephen Chung 2020-03-19 22:29:24 +08:00
  • 283602cdd8 Do not call function when optimizing if there is a script-defined function overridding it. Stephen Chung 2020-03-19 22:29:02 +08:00
  • 36b7124dd5 Add eval test. Stephen Chung 2020-03-19 20:55:53 +08:00
  • 702b2010f2 Add contains to Scope. Stephen Chung 2020-03-19 20:55:49 +08:00
  • 6a6c5f30de Add eval function. Stephen Chung 2020-03-19 19:53:42 +08:00
  • 0bae164764
    Merge pull request #109 from schungx/master Stephen Chung 2020-03-19 17:08:31 +08:00
  • cc8ec12691 Add more comments and examples. Stephen Chung 2020-03-19 13:52:10 +08:00
  • b3efb8b264 Disallow variable names starting with _ + digit. Stephen Chung 2020-03-18 23:09:53 +08:00
  • 0dc51f8e59 Removee debug_msgs feature. Stephen Chung 2020-03-18 22:03:50 +08:00
  • 019e73bc7e Allow empty statements. Stephen Chung 2020-03-18 18:41:18 +08:00
  • 03b2e9ad69 Fix default release profile and change optimization default back to Simple. Stephen Chung 2020-03-18 13:09:38 +08:00
  • 3518c5a630 Bump version to 0.11.0. Stephen Chung 2020-03-18 12:13:44 +08:00
  • e7c669343e Add no_std example. Stephen Chung 2020-03-18 12:09:34 +08:00
  • a9c65a962c Split no_stdlib and no_std into two features. Stephen Chung 2020-03-18 12:04:26 +08:00
  • ecded729ad Finalize no_std support. Stephen Chung 2020-03-18 10:50:51 +08:00
  • ca20faf170 Add code comments. Stephen Chung 2020-03-18 10:36:50 +08:00
  • 777f66ff3c Add section on statements and variables. Stephen Chung 2020-03-17 17:37:28 +08:00
  • 8efe080412 Handle break and return better. Stephen Chung 2020-03-17 17:33:37 +08:00
  • d2951bfb6b Make sure return is not an error. Stephen Chung 2020-03-17 16:52:06 +08:00
  • b26ca753c2 Mandatory semiclolons separating statements. Stephen Chung 2020-03-17 14:29:22 +08:00
  • c3d4a1b5e9 Optimize type_of. Stephen Chung 2020-03-17 10:27:43 +08:00
  • abe5365bfd Improve error messages to lists. Stephen Chung 2020-03-16 23:51:32 +08:00
  • d4311bddb0 Put comments into example scripts. Stephen Chung 2020-03-16 14:50:12 +08:00
  • ef8d428f42 Add code comments. Stephen Chung 2020-03-18 10:36:50 +08:00
  • 42ecae4366
    Merge pull request #103 from VictorKoenders/no_std Stephen Chung 2020-03-18 10:27:30 +08:00
  • c8a9df0a0a Added no_std support Trangar 2020-03-17 19:26:11 +01:00
  • dca2a927b5 Add section on statements and variables. Stephen Chung 2020-03-17 17:37:28 +08:00
  • 6ca39a019b Handle break and return better. Stephen Chung 2020-03-17 17:33:37 +08:00
  • 706e0a0c4c Make sure return is not an error. Stephen Chung 2020-03-17 16:52:06 +08:00
  • 2f7ca3935b Mandatory semiclolons separating statements. Stephen Chung 2020-03-17 14:29:22 +08:00
  • ad2601972a Optimize type_of. Stephen Chung 2020-03-17 10:27:43 +08:00
  • 705fbd0c1b Improve error messages to lists. Stephen Chung 2020-03-16 23:51:32 +08:00
  • 5ad2d24251 Put comments into example scripts. Stephen Chung 2020-03-16 14:50:12 +08:00
  • bffa3ed636
    Merge pull request #108 from schungx/master Stephen Chung 2020-03-16 13:12:57 +08:00
  • f3213b945d Fix power_of test. Stephen Chung 2020-03-16 13:08:53 +08:00
  • 35e354eb41 Refine README. Stephen Chung 2020-03-16 12:42:01 +08:00
  • 08abf07f83 Add string literal indexing and functon default value to optimizer. Stephen Chung 2020-03-16 12:41:52 +08:00
  • 5235ba71dd Run examples with full optimizations. Stephen Chung 2020-03-16 12:41:19 +08:00
  • 6d33a91d09 Fix minor floating-point digit error. Stephen Chung 2020-03-16 12:40:55 +08:00
  • f36caa6dc3 Add optimize_full pseudo feature. Stephen Chung 2020-03-16 12:40:42 +08:00
  • 2c90fea764 Catch illegal variable names. Stephen Chung 2020-03-16 12:38:01 +08:00
  • 372321dfe3 Add full optimization level for aggressive optimizing. Stephen Chung 2020-03-15 22:39:58 +08:00
  • f80e499e84 Minor code cleanup. Stephen Chung 2020-03-14 23:41:21 +08:00
  • 01cf777961 Use matches! macro. Stephen Chung 2020-03-14 23:41:15 +08:00
  • 6e076c409d Use matches! in examples. Stephen Chung 2020-03-14 23:40:30 +08:00
  • b9e4040635 Deprecate Error::description. Stephen Chung 2020-03-14 23:39:45 +08:00
  • b87dc1b281 Only map to expressions for constants. Stephen Chung 2020-03-14 20:08:18 +08:00
  • dd36f3387a Fixup code to make sure all feature builds succeed. Stephen Chung 2020-03-14 20:06:40 +08:00
  • 973153e832 Add no_optimize feature to disable optimizations. Stephen Chung 2020-03-14 20:06:10 +08:00
  • 26bdc8ba08 FIX - fixes panic when constant array is assigned to. Refine README section on constants. Stephen Chung 2020-03-14 19:46:44 +08:00
  • 504fd56f1f More documentation on chained assignment. Stephen Chung 2020-03-14 14:57:59 +08:00
  • 360fab7760 Merge branch 'chained-assignments' Stephen Chung 2020-03-14 14:41:48 +08:00
  • cb6171ebcd Merge branch 'constants' Stephen Chung 2020-03-14 14:33:56 +08:00
  • b3a22d942a Allow AST optimization based on external Scope. Stephen Chung 2020-03-14 14:30:44 +08:00
  • d5adee2209 Allow chained assignments. Stephen Chung 2020-03-14 11:51:45 +08:00
  • 9fb0520b0b Merge branch 'master' of https://github.com/schungx/rhai Stephen Chung 2020-03-13 23:09:58 +08:00
  • e5ed2f4be5 Update api.rs Stephen Chung 2020-03-13 23:09:45 +08:00
  • f59dbfc4e0
    Merge pull request #106 from schungx/master Stephen Chung 2020-03-13 18:36:43 +08:00
  • f91d068c0f
    Update api.rs Stephen Chung 2020-03-13 18:31:17 +08:00
  • c7a6777b70
    Merge branch 'master' into master Stephen Chung 2020-03-13 18:27:53 +08:00
  • 208a91ea93
    Merge pull request #107 from Jarqwiz/master Stephen Chung 2020-03-13 18:14:06 +08:00
  • 9844ae8665 Add constants. Stephen Chung 2020-03-13 18:12:41 +08:00
  • 6c72e3c48b
    Change filename to path for clarity Jarkko Kuukkanen 2020-03-13 12:07:51 +02:00
  • 8c1c37666d
    Make every file evaluation use PathBuf instead of str Jarkko Kuukkanen 2020-03-13 10:17:55 +02:00
  • 2a181e5aab FIX - fix minus/negative number conflict. Stephen Chung 2020-03-13 16:54:00 +08:00
  • 9bd66c7db3 Minor improvements to the optimizer. Stephen Chung 2020-03-12 23:46:52 +08:00
  • 91317c0d3e New sample script - primes.rhai. Stephen Chung 2020-03-12 23:46:40 +08:00
  • da440a5dff Add optimization section to README. Stephen Chung 2020-03-12 21:19:34 +08:00
  • 7e9a4fd965 Improve repl with command to print AST. Stephen Chung 2020-03-12 15:31:01 +08:00
  • 55dcd2f0f4 Fix call_fn calls with only one argument. Stephen Chung 2020-03-12 15:30:42 +08:00