Commit Graph

696 Commits

Author SHA1 Message Date
Stephen Chung
e6fabe58cc Unify function hash calculations, pre-hash module-qualified function calls. 2020-05-08 11:34:56 +08:00
Stephen Chung
5f12391ec6 Use hashed lookup for module-qualified functions and variables. 2020-05-08 00:19:08 +08:00
Stephen Chung
7f6ce29447 Add try_cast to cast any type to another. 2020-05-07 19:16:50 +08:00
Stephen Chung
c607c7c428 Move Engine functions and iterators lib to Packages API. 2020-05-07 15:25:50 +08:00
Stephen Chung
f3c0609377 Catch more assignment errors at parse time. 2020-05-07 12:25:09 +08:00
Stephen Chung
fb64adca93 Move fn_lib into State, and use StaticVec for function call arguments in dotting/indexing chains. 2020-05-07 10:00:10 +08:00
Stephen Chung
8e60976cfa Merge branch 'namespace' 2020-05-07 09:32:00 +08:00
Stephen Chung
34327f6e54 Avoid copying arguments in packages. 2020-05-06 23:52:47 +08:00
Stephen Chung
ae776f1e11 Avoid recreating array in loop. 2020-05-06 23:19:55 +08:00
Stephen Chung
f1abd11571 Add docs and test on creating module from AST and file. 2020-05-06 23:00:26 +08:00
Stephen Chung
1934811838 Merge branch 'master' into namespace 2020-05-06 22:58:15 +08:00
Stephen Chung
e966f5d49e Fix bug with let statement without expression. 2020-05-06 22:54:34 +08:00
Stephen Chung
59eaad1fdf Create module from file. 2020-05-06 22:26:52 +08:00
Stephen Chung
0cb0393c24 Bump version. 2020-05-06 19:59:45 +08:00
Stephen Chung
d75a8bc6cd Make sure all features compile correctly. 2020-05-06 19:45:17 +08:00
Stephen Chung
88fec57394 Make module_resolver optional and remove NullModuleResolver. 2020-05-06 16:09:44 +08:00
Stephen Chung
c9571d375a Add position to script error. 2020-05-06 00:09:04 +08:00
Stephen Chung
82e1af7acd Implement module resolvers. 2020-05-05 23:57:25 +08:00
Stephen Chung
036c054ba8 Fix indexer example. 2020-05-05 20:55:06 +08:00
Stephen Chung
87e0e783bc Display timestamp. 2020-05-05 20:54:56 +08:00
Stephen Chung
a1bcc5cd7d Merge branch 'master' into namespace 2020-05-05 20:42:16 +08:00
Stephen Chung
f081040767 Add support for custom type indexers. 2020-05-05 20:38:48 +08:00
Stephen Chung
ff86ae1bd8 Update README with module functions API. 2020-05-05 18:26:08 +08:00
Stephen Chung
aae9e43109 Implement module-qualified functions. 2020-05-05 17:51:40 +08:00
Stephen Chung
38e717a838 Build Module type plus engine hooks. 2020-05-05 15:00:10 +08:00
Stephen Chung
c03b162b7e Refactor code base and split into more module files. 2020-05-05 12:24:13 +08:00
Stephen Chung
143861747d Rename sub-scope/SubScope to module. 2020-05-05 10:39:12 +08:00
Stephen Chung
64036f69ca Refine modules. 2020-05-04 23:07:42 +08:00
Stephen Chung
2bdd174f16 Add import statement. 2020-05-04 19:36:58 +08:00
Stephen Chung
b94fa31e21 Merge branch 'master' into namespace 2020-05-04 18:06:39 +08:00
Stephen Chung
798e1df298 Do not error when a property is read-only. 2020-05-04 18:06:09 +08:00
Stephen Chung
ead9716f6d Add namespacing syntax. 2020-05-04 17:43:54 +08:00
Stephen Chung
4bf07182dc Merge branch 'namespace' of https://github.com/schungx/rhai into namespace 2020-05-04 10:42:57 +08:00
Stephen Chung
7da9d265d3 Avoid copying parameters for function calls. 2020-05-04 10:41:58 +08:00
Stephen Chung
329942b67f
Merge pull request #8 from jhwgh1968/namespace
Start on namespaces
2020-05-04 10:41:22 +08:00
jhwgh1968
7011e4068f Start on namespaces 2020-05-03 12:19:01 -05:00
Stephen Chung
3d05cc96cd Remove downcast_XXX from Variant. 2020-05-03 22:17:28 +08:00
Stephen Chung
68732a6e47 Use stepped range. 2020-05-03 22:12:10 +08:00
Stephen Chung
d83b829810 Avoid copying arguments for function calls. 2020-05-03 16:54:24 +08:00
Stephen Chung
fc66a7ecef Pretty up scripts with print. 2020-05-02 16:23:36 +08:00
Stephen Chung
fc99b981a1 Fix panic when string character index is OOB. 2020-05-01 23:39:55 +08:00
Stephen Chung
de4120b3bc Undelete benchmark.yml 2020-05-01 17:57:59 +08:00
Stephen Chung
4d98468aa6 Merge branch 'master' of https://github.com/jonathandturner/rhai 2020-05-01 17:52:34 +08:00
Stephen Chung
f3e02fcd03
Merge pull request #148 from GopherJ/patch-1
fix package name in README
2020-05-01 17:50:19 +08:00
Stephen Chung
c7c7fe3dfc Reduce size of Expr and Stmt by Boxing strings. 2020-05-01 17:32:39 +08:00
Cheng JIANG
fb2e48cca2
fix naming 2020-05-01 11:27:27 +02:00
Stephen Chung
5c5e1db61e Cleanup code. 2020-05-01 10:17:19 +08:00
Stephen Chung
4f91e7fbcf Avoid copying in Dynamic. 2020-04-30 22:52:36 +08:00
Stephen Chung
6dcbfc8e4b
Delete benchmark.yml 2020-04-29 23:19:29 +08:00
Stephen Chung
60b52c142e Fix README example for on_print and on_debug. 2020-04-29 23:03:18 +08:00