Commit Graph

304 Commits

Author SHA1 Message Date
Stephen Chung
1d661f2c8e Fix decimal build. 2021-03-24 22:26:07 +08:00
Stephen Chung
ac7f35cacb Move all functions metadata into metadata feature. 2021-03-24 19:27:38 +08:00
Stephen Chung
f70225ca1d Change HashMap to BTreeMap. 2021-03-23 12:13:53 +08:00
Stephen Chung
42d7736d94 Add conversions between Decimal and FLOAT. 2021-03-22 15:16:01 +08:00
Stephen Chung
22ff68cdc9 Fix feature builds. 2021-03-22 12:18:13 +08:00
Stephen Chung
a82f0fc738 Allow non-Dynamic in return_raw. 2021-03-22 11:18:09 +08:00
Stephen Chung
6667a22c0c Code style and docs. 2021-03-17 13:30:47 +08:00
Stephen Chung
5172ade179 Code style edits. 2021-03-16 18:16:40 +08:00
Stephen Chung
e9f280f917 Deprecate Module::set_fn_XXX API. 2021-03-15 12:39:06 +08:00
Stephen Chung
d0922adb5b Deprecate RegisterFn and RegisterResultFn. 2021-03-15 11:36:30 +08:00
Stephen Chung
975bb3d6bf Map in operator to contains function call. 2021-03-09 13:44:54 +08:00
Stephen Chung
ff7844893d Add contains for array. 2021-03-09 13:16:05 +08:00
Stephen Chung
a7ff9fb24f Add bytes method for strings. 2021-03-07 22:33:02 +08:00
Stephen Chung
330d3f87af Use namespace for ScriptFnDef. 2021-03-07 22:10:54 +08:00
Stephen Chung
88943915a7 Fix decimal build. 2021-03-05 12:58:27 +08:00
Stephen Chung
01664ef7ee Fix range overflow panics. 2021-03-04 23:47:52 +08:00
Stephen Chung
8d487906cc Remove unnecessary implementation. 2021-03-04 22:57:24 +08:00
Stephen Chung
0f56b56b9c Fix range function. 2021-03-04 21:43:00 +08:00
Stephen Chung
ade290da7e Simplify lifetimes. 2021-03-03 22:49:57 +08:00
Stephen Chung
7262d63909 Move default comparisons into builtin. 2021-03-02 23:08:54 +08:00
Stephen Chung
6fd2262ace Remove unnecessary is_def_fn function. 2021-03-02 22:27:53 +08:00
Stephen Chung
b76e8da5ee Cache built-in functions to improve resolution speed. 2021-03-02 13:48:41 +08:00
Stephen Chung
fc10df7d63 Keyword can no longer be overloaded. 2021-03-01 17:17:13 +08:00
Stephen Chung
b466d58192 Remove unnecessary AsRef and impl IntoIterator. 2021-03-01 15:58:11 +08:00
Stephen Chung
061fce1f02 No more pub_only. 2021-03-01 15:39:49 +08:00
Stephen Chung
733f4af8b3 Fix no_std build. 2021-03-01 09:30:23 +08:00
Stephen Chung
66b557692b Allow negative range step. 2021-02-27 15:27:40 +08:00
Stephen Chung
3f4dba9dbc Build in operators between string and char. 2021-02-25 13:29:49 +08:00
Stephen Chung
9495d3f733 Separate op-assignment with other function calls. 2021-02-25 10:59:22 +08:00
Stephen Chung
9d6ad2092c Fix decimal build. 2021-02-24 15:56:29 +08:00
Stephen Chung
4ac05aee8b Disallow implicit comparisons between different numeric types. 2021-02-24 15:45:29 +08:00
Stephen Chung
c501b34191 Implement strings concat via Dynamic wildcards. 2021-02-24 11:28:21 +08:00
Stephen Chung
c739e54e5b Refine strings package. 2021-02-24 11:05:39 +08:00
Stephen Chung
36420f0b99 Implement print/debug functions via Dynamic parameters. 2021-02-23 19:08:05 +08:00
Stephen Chung
ba2b0630f7 Add support for Dynamic wildcard arguments. 2021-02-23 16:06:36 +08:00
Stephen Chung
8248c9999d Add split version for chars. 2021-02-23 12:52:47 +08:00
Stephen Chung
e88713611c Add split for arrays. 2021-02-23 11:57:50 +08:00
Stephen Chung
ac3d8e35d4 Add splitn, rsplit and rsplitn equivalents to strings. 2021-02-23 11:56:04 +08:00
Stephen Chung
4120e3c88e Include decimal in generated docs. 2021-02-21 14:26:31 +08:00
Stephen Chung
5285dad1a8 Fix feature build. 2021-02-19 23:48:11 +08:00
Stephen Chung
182fc2c3d1 Check for constant values passed to methods. 2021-02-19 23:13:53 +08:00
Stephen Chung
724ad05916 Add wasm64 as potential target. 2021-02-19 15:50:48 +08:00
Stephen Chung
bd5ff457d2 Built-in interop between FLOAT/Decimal and INT. 2021-02-19 11:47:26 +08:00
Stephen Chung
d2121e2183 Add operators between FLOAT/Decimal and INT. 2021-02-18 14:33:27 +08:00
Stephen Chung
678d0f5e33 Fix f32_float build. 2021-02-17 14:05:35 +08:00
Stephen Chung
a2277d07f3 Add arithmetic operators between FLOAT and INT. 2021-02-17 13:06:47 +08:00
Stephen Chung
b2ca8c34d1 Add atan2 and hypot functions. 2021-02-17 12:27:27 +08:00
Stephen Chung
909d48caed Provide short-cuts to Decimal calculations. 2021-02-15 17:42:33 +08:00
Stephen Chung
f5c2903071 Refine Decimal rounding. 2021-02-15 12:07:45 +08:00
Stephen Chung
40e4a92401 Support scientific notation for Decimal parsing. 2021-02-14 17:34:53 +08:00
Stephen Chung
fc21756785 Add rounding functions to Decimal numbers. 2021-02-13 23:25:22 +08:00
Stephen Chung
224d93f167 Add comparison operators for Decimals. 2021-02-13 23:01:34 +08:00
Stephen Chung
f498dc81a3 Fix codegen test. 2021-02-13 22:19:46 +08:00
Stephen Chung
3650b04c38 Add Decimal number type. 2021-02-13 20:57:56 +08:00
Stephen Chung
aea5ec50c9 Fix no-std build. 2021-02-11 21:46:11 +08:00
Stephen Chung
6f71367c15 Use scneitific notation when printing large or small floating-point numbers. 2021-02-11 21:28:07 +08:00
Stephen Chung
61638d6566 Use ** for power/exponentiation. 2021-02-10 12:41:27 +08:00
Stephen Chung
8c26b49a39 Change trig functions to take/return radians. 2021-02-10 12:10:50 +08:00
Stephen Chung
8f47f7c9e2 Add new floating-point functions. 2021-02-09 15:57:38 +08:00
Stephen Chung
7b87f81850 Add has_override and script calls to function resolution cache. 2021-02-07 15:09:27 +08:00
Stephen Chung
bb925a697c Fix bug in Array::insert. 2021-01-29 22:29:36 +08:00
Stephen Chung
8c47d61456 Refine documentation and comments. 2021-01-11 23:09:33 +08:00
Stephen Chung
ef48f47b74 Refine docs and comments etc. 2021-01-02 23:30:10 +08:00
Stephen Chung
ba7f8c6391 Propagate source info. 2020-12-30 21:12:51 +08:00
Stephen Chung
8506640073 Use NonZeroU64 for function hashes. 2020-12-24 16:32:43 +08:00
Stephen Chung
08e7ad8c09 Add deprecated packages API. 2020-12-23 15:30:35 +08:00
Stephen Chung
15fb03218c Rename packages to global modules. 2020-12-22 23:45:14 +08:00
Stephen Chung
0157f912e0 Remove PackageLibrary and PackagesCollection. 2020-12-22 22:36:30 +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
db7b9cb0f9 Native only if function call is not a valid identifier. 2020-12-18 23:03:56 +08:00
Stephen Chung
aff207d4f4 Bump version. 2020-12-07 22:21:02 +08:00
Stephen Chung
c5babac3da Quote map property names. 2020-11-30 22:02:32 +08:00
Stephen Chung
4c4a209609 Fix tests. 2020-11-30 21:16:59 +08:00
Stephen Chung
1004bca5b5 Print arrays and maps with to_debug. 2020-11-30 11:20:51 +08:00
Stephen Chung
36546c7325 Fix builds 2020-11-27 23:37:59 +08:00
Stephen Chung
a0979d0c35 Code cleanup 2020-11-25 09:36:06 +08:00
Stephen Chung
36aa827e15 Simply interned strings dict. 2020-11-23 21:12:57 +08:00
Stephen Chung
9abd397276 Fix no_function build. 2020-11-23 20:26:28 +08:00
Stephen Chung
b43223a94f Add get_fn_metadata_list. 2020-11-23 19:11:32 +08:00
Stephen Chung
8d410dfc71 Add return type to function metadata. 2020-11-22 22:15:17 +08:00
Stephen Chung
6222f14fcb Fix no-std build. 2020-11-22 17:49:00 +08:00
Stephen Chung
07fe132e1a Add gen_fn_siguatures API. 2020-11-22 17:21:34 +08:00
Stephen Chung
739dce72e3 Move if_def_fn into CorePackage. 2020-11-22 15:41:55 +08:00
Stephen Chung
e5c9ca23b5 Build index when creating a module. 2020-11-21 22:18:32 +08:00
Stephen Chung
0046fe7e73 Prefer Engine::disable_symbol to disable eval. 2020-11-21 15:08:18 +08:00
Stephen Chung
783803ec46 Update comments with links. 2020-11-20 16:52:28 +08:00
Stephen Chung
d35a7eeaa8 Optimize PackagesCollection. 2020-11-19 10:24:43 +08:00
Stephen Chung
272c8505b8 Refactor use. 2020-11-16 23:10:14 +08:00
Stephen Chung
d50d48f26f Move definition of Array and Map to lib.rs. 2020-11-16 21:14:32 +08:00
Stephen Chung
adb902326e Reduce feature gates on imports. 2020-11-16 16:28:04 +08:00
Stephen Chung
ef02150afd Expose methods for Engine::register_module. 2020-11-16 14:07:48 +08:00
Stephen Chung
b75964e383 Add Dynamic::UNIT. 2020-11-15 23:14:29 +08:00
Stephen Chung
c919ee4e46 Fine tune hash map sizes. 2020-11-15 13:49:54 +08:00
Stephen Chung
bde8917ed4 Set capacity of hash maps. 2020-11-15 12:07:35 +08:00
Stephen Chung
7b27dcdd62 Fix error messages. 2020-11-11 13:25:45 +08:00
Stephen Chung
48886eacc8 Add == and != to arrays and maps. 2020-11-08 23:00:37 +08:00
Stephen Chung
f75942715d Remove clippy warnings. 2020-11-04 12:34:34 +08:00
Stephen Chung
d7d6f74dfd Add constant NO_POS. 2020-11-02 12:50:27 +08:00
Stephen Chung
6f3ce96d9d Enable termination token. 2020-11-02 11:04:45 +08:00