Stephen Chung
|
8f94a60020
|
Optimize interpolated strings.
|
2021-09-20 22:36:10 +08:00 |
|
Stephen Chung
|
adbe9a292e
|
Short circuit functions if empty: array, map, string.
|
2021-09-20 18:35:23 +08:00 |
|
Stephen Chung
|
6e7fbfa66f
|
Add pop to string.
|
2021-09-20 16:25:23 +08:00 |
|
Stephen Chung
|
71e8cf727d
|
Use LazyCompact for SmartString.
|
2021-09-20 11:34:01 +08:00 |
|
Stephen Chung
|
2d46bf37c8
|
Fix build.
|
2021-09-19 22:44:27 +08:00 |
|
Stephen Chung
|
e191f9d91e
|
Merge branch 'bug-fixes'
|
2021-09-19 22:34:47 +08:00 |
|
Stephen Chung
|
5d47ebf57a
|
Add test for constants to Scope::get_mut.
|
2021-09-18 10:14:54 +08:00 |
|
Stephen Chung
|
5163fb0a33
|
Upgrade to rust-decimal 1.16 and add sin/cos/tan.
|
2021-09-15 10:41:35 +08:00 |
|
Stephen Chung
|
08155c0978
|
Fix sign function for NaN.
|
2021-09-14 22:33:10 +08:00 |
|
Stephen Chung
|
bdbfa8ef5f
|
Catch mutually exclusive features.
|
2021-09-12 21:06:13 +08:00 |
|
Stephen Chung
|
50ad42bd7f
|
Fix metadata build.
|
2021-09-12 14:46:31 +08:00 |
|
Stephen Chung
|
c84f80d433
|
Use StaticVec for parsing.
|
2021-09-12 14:34:00 +08:00 |
|
Stephen Chung
|
b961a10d27
|
Refine code.
|
2021-09-12 14:33:48 +08:00 |
|
Stephen Chung
|
96dbbc76e4
|
Use StaticVec for function resolution caches for the common case where no modules are used.
|
2021-09-12 13:33:55 +08:00 |
|
Stephen Chung
|
6e25354076
|
Fix bit flag options and docs.
|
2021-09-12 13:21:53 +08:00 |
|
Stephen Chung
|
6510b617fe
|
Reduce usage of Default::default()
|
2021-09-11 19:40:40 +08:00 |
|
Stephen Chung
|
5d3a22ab6f
|
Fix NamespaceRef::new()
|
2021-09-11 19:40:31 +08:00 |
|
Stephen Chung
|
84be799403
|
Change StaticVec to 3 inline elements.
|
2021-09-10 20:25:22 +08:00 |
|
Stephen Chung
|
43de522568
|
Use option flags for certain AST nodes.
|
2021-09-10 20:23:59 +08:00 |
|
Stephen Chung
|
7956f9d59c
|
Reduce duplicated generics code.
|
2021-09-07 23:05:31 +08:00 |
|
Stephen Chung
|
09da9ddcbc
|
Move unit tests into separate file.
|
2021-09-07 22:12:04 +08:00 |
|
Stephen Chung
|
5ac33ce64d
|
Do not export FloatWrapper under no_float .
|
2021-09-04 18:43:18 +08:00 |
|
Stephen Chung
|
e8b811af28
|
Add test for minimal build Dynamic size.
|
2021-09-04 11:59:07 +08:00 |
|
Stephen Chung
|
6a2c9f0293
|
Add ASTNode::position().
|
2021-09-03 20:47:45 +08:00 |
|
Stephen Chung
|
cbe08fb64e
|
Merge branch 'bug-fixes'
|
2021-09-03 10:19:58 +08:00 |
|
Stephen Chung
|
71711998f1
|
Fix bug in catch error variable.
|
2021-09-03 10:05:58 +08:00 |
|
Stephen Chung
|
65fbfe36e7
|
Merge branch 'bug-fixes'
|
2021-09-02 22:49:17 +08:00 |
|
Stephen Chung
|
457be797a2
|
Fixed bug in using error variable within catch block.
|
2021-09-02 22:17:45 +08:00 |
|
Stephen Chung
|
7b2b26aa0d
|
Separate is_valid_function_name.
|
2021-08-30 15:42:47 +08:00 |
|
Stephen Chung
|
b6d38a8fc9
|
Fix metadata build.
|
2021-08-30 10:25:24 +08:00 |
|
Stephen Chung
|
6faa6358f0
|
Simplify code by merging Engine::global_namespace with Engine::global_modules.
|
2021-08-30 10:09:28 +08:00 |
|
Stephen Chung
|
6f3de4c803
|
Fix doc test.
|
2021-08-27 12:10:58 +08:00 |
|
Stephen Chung
|
aec4417bd5
|
Refine expect messages.
|
2021-08-26 23:58:41 +08:00 |
|
Stephen Chung
|
2a760eb44b
|
Update doc-comments.
|
2021-08-24 12:04:53 +08:00 |
|
Stephen Chung
|
db3049e574
|
Engine::register_type_XXX available under no_object.
|
2021-08-23 23:10:54 +08:00 |
|
Stephen Chung
|
58352e00bd
|
Prevent spill-over of new variables in Engine::call_fn.
|
2021-08-17 23:24:41 +08:00 |
|
Stephen Chung
|
b6eac65601
|
Simplify code.
|
2021-08-17 18:14:16 +08:00 |
|
Stephen Chung
|
9c6cea3c9f
|
Add Scope::set_or_push.
|
2021-08-17 15:51:14 +08:00 |
|
Stephen Chung
|
0354f154ce
|
Add Scope::is_constant.
|
2021-08-17 15:51:14 +08:00 |
|
Stephen Chung
|
114c93f430
|
Fix bug in custom syntax starting with disabled stardard keyword.
|
2021-08-17 15:51:14 +08:00 |
|
Stephen Chung
|
c1b4c81e75
|
Scope::set_value takes name that implements Into<Cow<str>>.
|
2021-08-17 15:51:14 +08:00 |
|
Stephen Chung
|
288d575046
|
Add log10 for Decimal.
|
2021-08-17 15:50:56 +08:00 |
|
Stephen Chung
|
06f217d526
|
Move deprecated functions into separate file.
|
2021-08-17 15:50:56 +08:00 |
|
Stephen Chung
|
180ad77224
|
Change Engine::consume_XXX to Engine::run_XXX.
|
2021-08-17 15:50:56 +08:00 |
|
Stephen Chung
|
e0125a1033
|
Allow self-terminating custom syntax.
|
2021-08-17 15:50:56 +08:00 |
|
Stephen Chung
|
3127f9a8af
|
Add new constant from functions for Dynamic.
|
2021-08-17 15:50:56 +08:00 |
|
Stephen Chung
|
ffb1531e0e
|
New constants for Dynamic.
|
2021-08-17 15:50:56 +08:00 |
|
Stephen Chung
|
94674679d9
|
Rename as_string and as_immutable_string.
|
2021-08-17 15:50:55 +08:00 |
|
Stephen Chung
|
b21deaf052
|
Support $symbol$ in custom syntax.
|
2021-08-17 15:50:55 +08:00 |
|
Stephen Chung
|
e0cae4546c
|
Polyfiill some functions for decimal+no_float.
|
2021-08-17 15:50:54 +08:00 |
|
Stephen Chung
|
224a2dfb60
|
Fix bug in dotting-indexing.
|
2021-08-17 15:32:48 +08:00 |
|
Stephen Chung
|
8a8bc2adfb
|
Improve FnPtr debug display.
|
2021-08-17 15:32:12 +08:00 |
|
Stephen Chung
|
3610b5eb7e
|
Change some inline(always) into inline.
|
2021-08-14 15:10:37 +08:00 |
|
Stephen Chung
|
0f46bc7725
|
Fix builds.
|
2021-08-13 14:04:27 +08:00 |
|
Stephen Chung
|
dba4510456
|
Better function parameter names.
|
2021-08-13 13:42:39 +08:00 |
|
Stephen Chung
|
9b56c1ba78
|
Optimize loops better.
|
2021-08-04 17:40:26 +08:00 |
|
Stephen Chung
|
4807fdf1cf
|
Loops cannot be pure.
|
2021-08-04 17:37:56 +08:00 |
|
Stephen Chung
|
81770f00e0
|
Rename variables and constants for bit flags.
|
2021-08-04 11:16:11 +08:00 |
|
Stephen Chung
|
1d82a11f0b
|
Change AST nodes to use bitflags for options.
|
2021-08-03 22:19:25 +08:00 |
|
Stephen Chung
|
0944261b88
|
Merge Stmt::Let and Stmt::Const into Stmt::Var.
|
2021-08-01 11:59:53 +08:00 |
|
Stephen Chung
|
29133cf973
|
Satisfy clippy.
|
2021-07-26 22:22:27 +08:00 |
|
Stephen Chung
|
2c50738c6c
|
Change field names of EvalState.
|
2021-07-26 10:03:46 +08:00 |
|
Stephen Chung
|
c7498503ba
|
Use lower case for feature marker.
|
2021-07-25 22:56:05 +08:00 |
|
Stephen Chung
|
6cb710652b
|
Fix doc link.
|
2021-07-25 11:51:26 +08:00 |
|
Stephen Chung
|
8531567ee9
|
Fix builds.
|
2021-07-24 14:23:14 +08:00 |
|
Stephen Chung
|
df482d3574
|
Satisfy clippy.
|
2021-07-24 14:11:16 +08:00 |
|
Stephen Chung
|
b8485b1909
|
Fix bug in indexing.
|
2021-07-24 12:27:33 +08:00 |
|
Stephen Chung
|
106c8ab5d1
|
Fix builds.
|
2021-07-14 22:33:47 +08:00 |
|
Stephen Chung
|
e3668227c0
|
Remove absolute path for files in the current directory.
|
2021-07-14 18:32:22 +08:00 |
|
Stephen Chung
|
7c93622b57
|
Handle more data types in Expr::from_dynamic.
|
2021-07-14 14:00:10 +08:00 |
|
Stephen Chung
|
cb312539fb
|
Fix ImmutableString docs.
|
2021-07-14 13:58:50 +08:00 |
|
Stephen Chung
|
925325820e
|
Make some Position functions const.
|
2021-07-14 13:58:18 +08:00 |
|
Stephen Chung
|
0e77c4f9a0
|
Short-circuit optimizations for special keywords.
|
2021-07-14 13:57:58 +08:00 |
|
Stephen Chung
|
5def8f04bd
|
Remove From<Dynamic> for Expr in favor of Expr::from_dynamic.
|
2021-07-14 13:53:04 +08:00 |
|
Stephen Chung
|
dad1fe8392
|
Handle more data types in Expr::from_dynamic.
|
2021-07-14 13:52:40 +08:00 |
|
Stephen Chung
|
713f8ea672
|
Implement more methods for custom iterators.
|
2021-07-12 13:05:38 +08:00 |
|
Stephen Chung
|
e0673a2f1a
|
Change some #[inline(always)] to [#inline].
|
2021-07-10 11:06:13 +08:00 |
|
Stephen Chung
|
4d25fd0192
|
Remove unnecessary AsRef<str>.
|
2021-07-10 10:11:14 +08:00 |
|
Stephen Chung
|
d517a0219b
|
Revert "Remove unnecessary imports."
This reverts commit d6220f0d8d .
|
2021-07-08 23:03:36 +08:00 |
|
Stephen Chung
|
d6220f0d8d
|
Remove unnecessary imports.
|
2021-07-08 22:42:50 +08:00 |
|
Stephen Chung
|
75a8a4d4e3
|
Enable json command in REPL.
|
2021-07-08 14:09:31 +08:00 |
|
Stephen Chung
|
9cb7610cc5
|
Unreserve begin, end, then, each, unless
|
2021-07-06 09:51:29 +08:00 |
|
Stephen Chung
|
d0fc5257c4
|
Fix formatting.
|
2021-07-04 17:09:26 +08:00 |
|
Stephen Chung
|
95c9423723
|
Revert "Change no-std build scripts."
This reverts commit 8e94b2e3b8 .
|
2021-07-04 17:02:56 +08:00 |
|
Stephen Chung
|
8e94b2e3b8
|
Change no-std build scripts.
|
2021-07-04 16:58:03 +08:00 |
|
Stephen Chung
|
4adc044c79
|
Fix builds.
|
2021-07-04 16:51:05 +08:00 |
|
Stephen Chung
|
694ac5b5bd
|
General code fixups.
|
2021-07-04 16:40:15 +08:00 |
|
Stephen Chung
|
23cc48f937
|
Implement standard traits for Imports.
|
2021-07-04 16:33:26 +08:00 |
|
Stephen Chung
|
ab21ba703f
|
Rename scope_changed to scope_may_be_changed.
|
2021-07-04 16:31:01 +08:00 |
|
Stephen Chung
|
b4da054bab
|
Catch more parse errors.
|
2021-07-04 00:15:27 +08:00 |
|
Stephen Chung
|
69c14e65f3
|
Add ImmutableString::new() to mirror String API.
|
2021-07-02 11:51:13 +08:00 |
|
Stephen Chung
|
88bfe64e35
|
Simplify error display.
|
2021-07-02 11:50:24 +08:00 |
|
Stephen Chung
|
8c802dcd58
|
Fix optimizer bug.
|
2021-07-01 12:27:29 +08:00 |
|
Stephen Chung
|
a0f51a1a39
|
Split calc_qualified_var_hash.
|
2021-06-30 16:28:37 +08:00 |
|
Stephen Chung
|
f033896fec
|
Add From<BTreeSet> and From<HashSet> for Dynamic.
|
2021-06-30 11:08:29 +08:00 |
|
Stephen Chung
|
fc0256aff9
|
Refine ChainArgument.
|
2021-06-30 10:13:45 +08:00 |
|
Stephen Chung
|
c87645ba77
|
Fix unchecked build.
|
2021-06-29 23:29:05 +08:00 |
|
Stephen Chung
|
69352d74c2
|
Optimize Scope layout.
|
2021-06-29 23:22:54 +08:00 |
|
Stephen Chung
|
fc349f67f8
|
Make more functions const.
|
2021-06-29 23:17:31 +08:00 |
|
Stephen Chung
|
bd35999b75
|
Remove unnecessary Box::new().
|
2021-06-29 21:58:05 +08:00 |
|
Stephen Chung
|
8b0299077b
|
Simplify FuncArgs::parse.
|
2021-06-29 21:47:55 +08:00 |
|
Stephen Chung
|
d146de4ff9
|
Make FnPtr::fn_name_raw const.
|
2021-06-29 21:47:27 +08:00 |
|
Stephen Chung
|
0346bb874b
|
Make Expr::position const.
|
2021-06-29 18:41:03 +08:00 |
|
Stephen Chung
|
08828dd8c1
|
Use .into() instead of Box::new()
|
2021-06-29 18:25:20 +08:00 |
|
Stephen Chung
|
4143ef1e3f
|
Simplify Engine creation.
|
2021-06-29 17:47:31 +08:00 |
|
Stephen Chung
|
27c126d2f0
|
Make on_print/on_debug Option.
|
2021-06-29 17:42:03 +08:00 |
|
Stephen Chung
|
8f4a582f88
|
Remove free list of empty function resolution caches.
|
2021-06-28 22:06:46 +08:00 |
|
Stephen Chung
|
a13a724361
|
Fix builds.
|
2021-06-28 18:29:53 +08:00 |
|
Stephen Chung
|
e40e81ac1a
|
Mark simple functions const.
|
2021-06-28 18:06:05 +08:00 |
|
Stephen Chung
|
0c99165007
|
Remove description.
|
2021-06-28 17:24:05 +08:00 |
|
Stephen Chung
|
0888738b75
|
Change AST::clone_source to AST::source_raw.
|
2021-06-28 13:53:30 +08:00 |
|
Stephen Chung
|
7196b017f5
|
Add is_odd, is_even and is_zero.
|
2021-06-27 22:10:52 +08:00 |
|
Stephen Chung
|
1247b89352
|
Deprecate description for errors.
|
2021-06-24 14:55:53 +08:00 |
|
Stephen Chung
|
83297ffa00
|
Bump version to 1.0.
|
2021-06-24 11:50:03 +08:00 |
|
Stephen Chung
|
178fe6b978
|
Remove deprecated API.
|
2021-06-24 09:48:44 +08:00 |
|
Stephen Chung
|
2342777a13
|
Iterator reference parameters.
|
2021-06-21 19:12:28 +08:00 |
|
Stephen Chung
|
3b345acebf
|
Impl returns closures.
|
2021-06-20 21:42:13 +08:00 |
|
Stephen Chung
|
4093727dcb
|
New string functions.
|
2021-06-17 13:31:58 +08:00 |
|
Stephen Chung
|
425e038f4b
|
Split FnPtr into own file.
|
2021-06-17 09:50:32 +08:00 |
|
Stephen Chung
|
40e33fa6f9
|
Add to_hex, to_octal and to_binary.
|
2021-06-16 23:49:18 +08:00 |
|
Stephen Chung
|
a9ed434c73
|
Refine error position for missing indexer.
|
2021-06-16 19:45:45 +08:00 |
|
Stephen Chung
|
0b028dc900
|
Fix decimal build.
|
2021-06-16 19:44:54 +08:00 |
|
Stephen Chung
|
c492fa3234
|
Do not export SmartString.
|
2021-06-16 19:02:37 +08:00 |
|
Stephen Chung
|
204dcf60ac
|
Export Identifier only when internals.
|
2021-06-16 18:58:48 +08:00 |
|
Stephen Chung
|
e684626fc4
|
Remove unnecessary #[must_use].
|
2021-06-16 18:58:32 +08:00 |
|
Stephen Chung
|
42a14ab4cc
|
Make file structures consistent.
|
2021-06-16 18:36:33 +08:00 |
|
Stephen Chung
|
aa2e04bd25
|
Simplify Expr::Export.
|
2021-06-16 16:35:56 +08:00 |
|
Stephen Chung
|
0a857e6944
|
Remove position for catch keyword.
|
2021-06-16 16:15:29 +08:00 |
|
Stephen Chung
|
03cb398edf
|
Better implementation for Expression::get_literal_value.
|
2021-06-16 12:24:36 +08:00 |
|
Stephen Chung
|
b5898f451e
|
Fix no_closure build.
|
2021-06-14 12:09:54 +08:00 |
|
Stephen Chung
|
bbf3d31fbf
|
Code style refactor.
|
2021-06-14 12:02:22 +08:00 |
|
Stephen Chung
|
743d48f44f
|
Code style cleanup.
|
2021-06-13 17:41:34 +08:00 |
|
Stephen Chung
|
8ca24059b1
|
Add #[must_use]
|
2021-06-12 22:47:43 +08:00 |
|
Stephen Chung
|
68ea8c27fd
|
Fix unchecked.
Do not duplicate data size checking.
|
2021-06-12 10:26:50 +08:00 |
|
Stephen Chung
|
f9dcfeb1ad
|
Check data size after assignments.
|
2021-06-11 19:59:50 +08:00 |
|
Stephen Chung
|
79d9977cd5
|
Change take_string and take_immutable_string to as_XXX.
|
2021-06-10 10:45:44 +08:00 |
|
Stephen Chung
|
a5031969ca
|
New custom syntax expression types.
|
2021-06-10 10:16:39 +08:00 |
|
Stephen Chung
|
c3eb6d65f6
|
Refine Target variant names.
|
2021-06-08 23:40:21 +08:00 |
|
Stephen Chung
|
6397ce671e
|
Simplify code.
|
2021-06-08 23:40:10 +08:00 |
|
Stephen Chung
|
bcf82dafcb
|
Fix tests.
|
2021-06-08 19:30:13 +08:00 |
|
Stephen Chung
|
ae9f4b5b71
|
Remove collect() with exact sizes.
|
2021-06-08 15:48:55 +08:00 |
|
Stephen Chung
|
2c21928f67
|
Simplify constant function call arguments.
|
2021-06-08 14:46:49 +08:00 |
|
Stephen Chung
|
3e08160653
|
Simplify variable name parsing.
|
2021-06-07 11:43:00 +08:00 |
|
Stephen Chung
|
411b718a3b
|
Fix test.
|
2021-06-07 11:21:45 +08:00 |
|
Stephen Chung
|
1e66f1963a
|
Add counter variable to for statement.
|
2021-06-07 11:01:16 +08:00 |
|
Stephen Chung
|
989cb702c0
|
Use chars() to iterate strings.
|
2021-06-07 09:47:49 +08:00 |
|
Stephen Chung
|
859a18c6fd
|
Fix Dynamic hashing.
|
2021-06-06 14:47:32 +08:00 |
|
Stephen Chung
|
c02d702081
|
Use StaticVec.
|
2021-06-06 12:17:04 +08:00 |
|
Stephen Chung
|
a530fbf4ff
|
Remove unnecessary raw stirngs.
|
2021-06-05 15:26:43 +08:00 |
|
Stephen Chung
|
3371eed411
|
Use write_str.
|
2021-06-04 14:23:40 +08:00 |
|