Commit Graph

174 Commits

Author SHA1 Message Date
Stephen Chung
fbfb7677c1 Add is_def_var and is_def_fn. 2020-10-03 16:25:58 +08:00
Stephen Chung
d91d983c74 Enable dots on numbers to parse as method calls. 2020-09-23 22:48:28 +08:00
Stephen Chung
02f37870e5 Better position of string literal errors. 2020-09-22 19:18:06 +08:00
Stephen Chung
ae11dbbefe Fix feature flags. 2020-08-05 22:53:01 +08:00
Stephen Chung
4079164bfd Implement closures. 2020-08-03 12:10:20 +08:00
Stephen Chung
60891e694f Streamline code and feature gates. 2020-07-31 22:30:23 +08:00
Stephen Chung
8d0623d07f Add is_shared function. 2020-07-31 18:43:34 +08:00
Stephen Chung
0295e109ad Fix features 2020-07-31 18:06:01 +08:00
Stephen Chung
871fcb38be Minor style changes and make sure no_shared works on all. 2020-07-31 16:03:08 +08:00
Ilya Lakhin
89f75bbf0c Merge remote-tracking branch 'schungx/closures' into closures 2020-07-31 13:05:16 +07:00
Ilya Lakhin
ca64668e58 take() keyword; shared test with registered functions with callbacks 2020-07-31 11:41:22 +07:00
Ilya Lakhin
aa87a7f5ef Fixes in Engine to properly interpret Shared Dynamic 2020-07-31 10:47:22 +07:00
Ilya Lakhin
e5fe222de3 Shared variant of Dynamic type; All read/write access operations in Dynamic backed by Read/Write lock guards; new shared() script function 2020-07-31 10:47:14 +07:00
Stephen Chung
98b294c699 Implement capturing. 2020-07-30 18:18:28 +08:00
Stephen Chung
afbcd0fc0b Replace StaticVec with SmallVec. 2020-07-29 16:10:06 +08:00
Stephen Chung
e2daba55d7 Refine unicode-xid-ident feature writeup. 2020-07-29 13:57:17 +08:00
Stephen Chung
eeb86f5efb Merge branch 'master' of https://github.com/jonathandturner/rhai 2020-07-29 11:43:48 +08:00
ekicyou
288e0a4d14 add unicode_xid, test 2020-07-29 08:25:37 +09:00
ekicyou
9b0375b870 add unicode-xid 2020-07-29 07:03:21 +09:00
ekicyou
79022b1858 refactoring 2020-07-29 06:54:23 +09:00
ekicyou
c6d5bd000d move is_valid_identifier 2020-07-29 06:24:41 +09:00
ekicyou
56a8120d75 add get_identifier 2020-07-29 05:26:57 +09:00
Stephen Chung
37ea24afe9 Improve docs. 2020-07-28 19:11:37 +08:00
Stephen Chung
f05cd1fdf3 Add shared and sync to reserved keywords. 2020-07-28 10:25:26 +08:00
Stephen Chung
ec5082c328 Better handling of reserved keywords. 2020-07-26 22:25:30 +08:00
Stephen Chung
ce20248792 Add more reserved keywords. 2020-07-26 21:57:30 +08:00
Stephen Chung
6b600704a3 Avoid warnings. 2020-07-26 15:53:22 +08:00
Stephen Chung
94c2f64473 Merge branch 'master' of https://github.com/jonathandturner/rhai 2020-07-25 16:05:11 +08:00
Stephen Chung
c825de6f77 Mark internal data structures with [INTERNALS]. 2020-07-25 16:05:08 +08:00
John-John Tedro
1aab77df1c Avoid scanning over slices to validate numerical literals 2020-07-25 09:52:54 +02:00
Stephen Chung
284e58e8a1 Improve documentation on internal types. 2020-07-25 15:52:27 +08:00
Stephen Chung
6d551f1596 Add currying support. 2020-07-22 23:12:09 +08:00
Stephen Chung
3ae7cf4018 Improve treatment of disabled symbols and custom symbols. 2020-07-17 14:50:23 +08:00
Stephen Chung
d119e13b79 Allow binding of this pointer in FnPtr calls. 2020-07-17 10:18:07 +08:00
Stephen Chung
16fbfbb606 Enable call in function-call style. 2020-07-16 12:09:31 +08:00
Stephen Chung
adc96e24bd Fix all features. 2020-07-13 19:38:50 +08:00
Stephen Chung
7436fc1c05 Fix bug in tokenizing reserved symbols. 2020-07-10 11:41:56 +08:00
Stephen Chung
99164ebceb Add custom syntax. 2020-07-09 19:54:28 +08:00
Stephen Chung
d92a514f48 Add reserved symbols. 2020-07-08 12:09:18 +08:00
Stephen Chung
d9fe6a1980 Add boolean xor operator and readjust % precedence. 2020-07-06 12:24:28 +08:00
Stephen Chung
a27f89b524 Add new register_fn_raw API. 2020-07-05 23:08:44 +08:00
Stephen Chung
e390dd73e6 Add custom operators. 2020-07-05 17:41:45 +08:00
Stephen Chung
936a3ff44a Add feature to disable symbols. 2020-07-05 15:23:51 +08:00
Stephen Chung
d6a08be223 Refactor. 2020-06-29 23:55:28 +08:00
Stephen Chung
ab347fa14e Add Module::iter_script_fn. 2020-06-26 22:33:27 +08:00
Stephen Chung
74c82bbd9c Refactor. 2020-06-26 22:03:21 +08:00
Stephen Chung
8c632ed928 Remove println. 2020-06-26 19:54:12 +08:00
Stephen Chung
31eaf321d0 Refactor tokenizer. 2020-06-26 19:44:50 +08:00
Stephen Chung
58c198776f Code cleanup. 2020-06-25 11:07:46 +08:00
Stephen Chung
a9b168ba99 Refine docs. 2020-06-22 22:02:49 +08:00
Stephen Chung
1adf3cc39a Support for trailing commas. 2020-06-16 22:14:46 +08:00
Stephen Chung
f26c12b8ea Better error messages for unrecognized tokens. 2020-06-14 19:13:11 +08:00
Stephen Chung
bb691a0313 Add maximum data size limits. 2020-06-14 14:25:47 +08:00
Stephen Chung
0ac3a7d8b4 Use type alias TokenStream. 2020-06-11 18:13:33 +08:00
Stephen Chung
b8da1691d3 Consolidate callbacks. 2020-06-02 13:33:16 +08:00
Stephen Chung
cec6748ac6 Remove no_module gates to prepare for plugins. 2020-06-01 10:58:14 +08:00
Stephen Chung
bbed4c6ef4 Docs. 2020-05-24 23:42:40 +08:00
Stephen Chung
8b5550eeb6 Complete StaticVec implementation. 2020-05-17 22:19:49 +08:00
Stephen Chung
a7bfac21bd Reducing boxing and sizes of Expr/Stmt. 2020-05-09 21:46:38 +08:00
Stephen Chung
0d20137d6c Implement private modifier for functions. 2020-05-09 11:29:30 +08:00
Stephen Chung
88fec57394 Make module_resolver optional and remove NullModuleResolver. 2020-05-06 16:09:44 +08:00
Stephen Chung
38e717a838 Build Module type plus engine hooks. 2020-05-05 15:00:10 +08:00
Stephen Chung
143861747d Rename sub-scope/SubScope to module. 2020-05-05 10:39:12 +08:00
Stephen Chung
2bdd174f16 Add import statement. 2020-05-04 19:36:58 +08:00
Stephen Chung
ead9716f6d Add namespacing syntax. 2020-05-04 17:43:54 +08:00
jhwgh1968
7011e4068f Start on namespaces 2020-05-03 12:19:01 -05:00
Stephen Chung
fb8459d4de Remove unnecessary usings. 2020-04-24 20:05:28 +08:00
Stephen Chung
5aaaa7be3b Simplify parsing by expecting the tokens stream will never be exhausted. 2020-04-23 13:24:24 +08:00
Stephen Chung
05bad53011 Encapsulate function calls and handle map property access more efficiently. 2020-04-23 10:21:02 +08:00
Stephen Chung
7df36033c4 Warn against === and !==. 2020-04-22 17:36:51 +08:00
Stephen Chung
a1e33af5a0 Reduce size of Position by limiting resolution to 16 bits. 2020-04-20 11:08:54 +08:00
Stephen Chung
65d611b976 FIX: no_float errors. 2020-04-17 20:08:41 +08:00
Stephen Chung
c5f66e932b Simplify parsing by introducing an EOF token. 2020-04-17 20:01:41 +08:00
Stephen Chung
a35518fe49 Split tokenizer into separate file, plus fix no_std feature. 2020-04-15 22:21:23 +08:00