Commit Graph

1269 Commits

Author SHA1 Message Date
Stephen Chung
c5e2620d0f Minor code refactors. 2021-02-03 19:14:26 +08:00
Stephen Chung
42058836ba Fix panic in property access parsing error. 2021-01-31 18:44:50 +08:00
Stephen Chung
7fc38d4cd2 Change rhaiscript.github.io to rhai.rs 2021-01-30 07:19:54 +08:00
Stephen Chung
bb925a697c Fix bug in Array::insert. 2021-01-29 22:29:36 +08:00
Stephen Chung
903b6d6795 Rename set_doc_comments to enable_doc_comments. 2021-01-28 16:59:19 +08:00
Stephen Chung
cef61bc924 Fix no_function build. 2021-01-28 16:48:56 +08:00
Stephen Chung
f76daadcba Refine FuncArgs trait. 2021-01-28 15:29:55 +08:00
Stephen Chung
d14168a419 Refine Dynamic::take_immutable_string when shared. 2021-01-27 18:34:32 +08:00
Stephen Chung
e902c74073 Add threading example. 2021-01-25 11:31:54 +08:00
Stephen Chung
c245fe88fd Allow stacking ! operators. 2021-01-24 21:21:15 +08:00
Stephen Chung
049f472ac9 Fix bug in internals. 2021-01-23 10:34:38 +08:00
Stephen Chung
3b42cc5bb2 Fix bug where plugin module parameters are consumed. 2021-01-23 09:37:27 +08:00
Stephen Chung
8aae3ac46c Add function name to NativeCallContext. 2021-01-21 21:49:25 +08:00
Stephen Chung
f6553c1426 Fix feature builds. 2021-01-21 10:32:05 +08:00
Stephen Chung
0f7b390881 Serialize Timestamp with type name instead of panic. 2021-01-19 14:22:55 +08:00
Stephen Chung
4a8debb5ed Fix builds. 2021-01-18 10:56:42 +08:00
Stephen Chung
ec272cf9b9 Add Serialize/Deserialize for Dynamic and ImmutableString. 2021-01-18 10:30:58 +08:00
Stephen Chung
6b5a14ee88 Fix compilation bug. 2021-01-18 10:23:41 +08:00
Stephen Chung
65621b79b1 Fix volatile warnings. 2021-01-16 14:46:03 +08:00
Ilya Lakhin
421baebbc1 Exposing AST functions shared module under internals feature 2021-01-16 01:38:50 +07:00
Stephen Chung
c4b6c31bf0 Use ahash as default hasher. 2021-01-15 23:52:56 +08:00
Stephen Chung
1c7884f0d8 Switch to fxhash for fast hashing. 2021-01-15 23:30:45 +08:00
Stephen Chung
92c7fd9e5b Better error messages. 2021-01-15 17:13:04 +08:00
Stephen Chung
3f44e2893c Wrap up 0.19.10. 2021-01-14 19:07:03 +08:00
Stephen Chung
fe65bf6137 Fix bug in optimizer. 2021-01-12 23:52:50 +08:00
Stephen Chung
8c47d61456 Refine documentation and comments. 2021-01-11 23:09:33 +08:00
Stephen Chung
5b9a18f5b8 Fix FileModuleResolver::clear_cache_for_path. 2021-01-10 19:34:26 +08:00
Stephen Chung
14fe4f9f1b Change resolve_ast return type. 2021-01-09 23:26:50 +08:00
Stephen Chung
0b6657d1b1 Fix clippy. 2021-01-09 17:13:34 +08:00
Stephen Chung
e5b345bca4 Fix feature builds. 2021-01-09 17:06:01 +08:00
Stephen Chung
ad250fc973 Recursive self-contained AST. 2021-01-09 16:52:22 +08:00
Stephen Chung
637f47d259 Split AST::set_source into set_source/clear_source. 2021-01-09 15:20:07 +08:00
Stephen Chung
1513e6ab6a Fix internals build. 2021-01-09 00:49:50 +08:00
Stephen Chung
bfe9ac2188 Fix feature builds. 2021-01-09 00:40:44 +08:00
Stephen Chung
0f1f6c4ad3 Add Engine::compile_to_self_contained. 2021-01-09 00:24:55 +08:00
Stephen Chung
b96c832141 Add EvalAltResult::clear_position(). 2021-01-08 14:29:57 +08:00
Stephen Chung
ec18bd26a2 Handle no-std without sync. 2021-01-07 22:52:20 +08:00
Stephen Chung
96b1e7777b Update URL links. 2021-01-07 17:30:06 +08:00
Stephen Chung
e059ca009c Fix feature builds. 2021-01-06 18:22:45 +08:00
Stephen Chung
a5d6392107 Use NonZero for limits. 2021-01-06 13:46:53 +08:00
Stephen Chung
3fbcefe0ed Move HashableHashMap to utils. 2021-01-05 18:37:07 +08:00
Stephen Chung
d5891d4802 Remove eval_expr_as_target. 2021-01-05 18:01:42 +08:00
Stephen Chung
cf9d35166d Remove hashing of the entire script by making Expr and Stmt Hash. 2021-01-04 11:58:24 +08:00
Stephen Chung
e2a47b2a65 Disallow duplicated function definitions. 2021-01-03 20:54:08 +08:00
Stephen Chung
103af43f68 Fix typo in sync. 2021-01-03 13:46:08 +08:00
Stephen Chung
33f7c8557c Put source into AST. 2021-01-03 13:30:01 +08:00
Stephen Chung
d3894e8aef Add #[inline] 2021-01-03 13:29:42 +08:00
Stephen Chung
70a0d6ce58 Make id_raw return Option<&ImmutableString> 2021-01-03 11:25:25 +08:00
Stephen Chung
e3b7aa47a0 Merge branch 'master' of https://github.com/schungx/rhai 2021-01-03 11:15:57 +08:00
Ilya Lakhin
85ec781a35 Module::id_raw became crate-public 2021-01-03 09:29:50 +07:00
Ilya Lakhin
acbf5d8723 AST::set_source affects internal module id 2021-01-03 09:29:50 +07:00
Stephen Chung
1bbf473ec7 Add source info to native calls. 2021-01-03 00:20:13 +08:00
Stephen Chung
ef48f47b74 Refine docs and comments etc. 2021-01-02 23:30:10 +08:00
Stephen Chung
5a3bbaa322 Reduce size of FnPtr. 2021-01-02 13:37:40 +08:00
Stephen Chung
05fa8460a3 Remove unnecessary err.fill_position() 2021-01-02 13:29:16 +08:00
Stephen Chung
0a69caaf6d Refine API for contexts. 2021-01-01 17:05:06 +08:00
Stephen Chung
8f7a588ac3 Fix no_std. 2020-12-30 22:37:22 +08:00
Stephen Chung
ba7f8c6391 Propagate source info. 2020-12-30 21:12:51 +08:00
Stephen Chung
386e34aacd Fix no_module feature. 2020-12-30 15:37:39 +08:00
Stephen Chung
db5b855dea Replace - with &ndash; 2020-12-29 23:01:34 +08:00
Stephen Chung
a45876856d Enhance rhai-repl. 2020-12-29 22:04:31 +08:00
Stephen Chung
049ad3b6fd Move rhai-repl and rhai-doc to bin. 2020-12-29 15:36:42 +08:00
Stephen Chung
2858aa3b2f Avoid calling token mapper if none is specified. 2020-12-29 13:12:11 +08:00
Stephen Chung
13f5cec291 Fix call stack limits. 2020-12-29 12:29:45 +08:00
Stephen Chung
41c6f985f5 Fix bug with tokenizing identifiers. 2020-12-29 11:37:15 +08:00
Stephen Chung
eca8212f38 More code refinements. 2020-12-29 10:41:20 +08:00
Stephen Chung
e481a8019d Simplify code and better error messages. 2020-12-28 14:21:13 +08:00
Stephen Chung
5c813ca7c0 Code cleanup. 2020-12-28 09:49:54 +08:00
Stephen Chung
6b8d78d64c Streamline parsing. 2020-12-27 16:50:48 +08:00
Stephen Chung
48af8719e7 Fix closure property access. 2020-12-27 11:50:24 +08:00
Stephen Chung
88f63fa24b Refine docs. 2020-12-26 23:21:16 +08:00
Stephen Chung
66d3af256e Enhance custom operators. 2020-12-26 23:21:09 +08:00
Stephen Chung
0a35c4cb41 Change custom precedence to Option<NonZeroU8>. 2020-12-26 17:42:19 +08:00
Stephen Chung
dc4e52e795 Code enhancements. 2020-12-26 13:05:57 +08:00
Stephen Chung
822fe80105 Reduce redirections. 2020-12-25 11:02:29 +08:00
Stephen Chung
8f969b1ab5 Reduce indirections. 2020-12-24 23:22:50 +08:00
Stephen Chung
363085efc3 Map actual 0 hash to 42. 2020-12-24 18:43:04 +08:00
Stephen Chung
8506640073 Use NonZeroU64 for function hashes. 2020-12-24 16:32:43 +08:00
Stephen Chung
c81a59435b Make Scope Clone + Hash. 2020-12-24 09:42:03 +08:00
Stephen Chung
9fd7e01197 Simplify code. 2020-12-23 23:29:19 +08:00
Stephen Chung
08e7ad8c09 Add deprecated packages API. 2020-12-23 15:30:35 +08:00
Stephen Chung
cebbc2b607 Fix duplicate Ident export. 2020-12-23 12:11:53 +08:00
Stephen Chung
f55a56c6bc Engine::register_global_module and Engine::register_static_module must be passed shared Module. 2020-12-23 10:08:43 +08:00
Stephen Chung
15fb03218c Rename packages to global modules. 2020-12-22 23:45:14 +08:00
Stephen Chung
eb46ec8296 Simplify Imports. 2020-12-22 22:36:36 +08:00
Stephen Chung
0157f912e0 Remove PackageLibrary and PackagesCollection. 2020-12-22 22:36:30 +08:00
Stephen Chung
2a7e6c0884 Fixup docs. 2020-12-22 22:35:25 +08:00
Stephen Chung
2e7ec8f1db IdentX -> Ident. 2020-12-22 16:45:56 +08:00
Stephen Chung
206400b187 Fix serde feature. 2020-12-22 15:27:27 +08:00
Stephen Chung
10da4d8976 LexError directly to ParseError. 2020-12-22 11:55:51 +08:00
Stephen Chung
8c41e549f7 Add Engine::gen_fn_metadata_with_ast_to_json. 2020-12-22 11:13:13 +08:00
Stephen Chung
ff67efc6d5 Add source to contexts. 2020-12-21 23:12:45 +08:00
Stephen Chung
5ac83f0f46 Add context source to on_debug. 2020-12-21 22:04:46 +08:00
Stephen Chung
2955a4ab64 Fix unary operators binding. 2020-12-21 17:39:37 +08:00
Stephen Chung
730a7320d6 Run eval with new State. 2020-12-20 23:46:46 +08:00
Stephen Chung
cec27846ea Simplify code. 2020-12-20 23:25:11 +08:00
Stephen Chung
f99703f951 Add Engine::disable_doc_comments and smarter doc-comments treatment. 2020-12-20 20:05:23 +08:00
Stephen Chung
22039b24b3 Add export to JSON. 2020-12-20 12:27:47 +08:00
Stephen Chung
c6a3ce2cd5 Add metadata export to JSON. 2020-12-19 19:42:18 +08:00
Stephen Chung
0182b2d3f4 Correct speed claim and others in docs. 2020-12-19 17:46:34 +08:00