Commit Graph

1504 Commits

Author SHA1 Message Date
Stephen Chung
980a13ca42 Add switch case conditions. 2021-04-16 12:04:33 +08:00
Stephen Chung
8da4c0c2b2 Default switch case must be last. 2021-04-16 09:41:02 +08:00
Stephen Chung
187dbe537f Improve debug AST printing. 2021-04-13 15:52:45 +08:00
Stephen Chung
5a0199f44f Explanation of parse_string_literal return values. 2021-04-13 14:38:04 +08:00
Stephen Chung
44e2e6aeb4 Fix string handling at EOF. 2021-04-11 21:49:03 +08:00
Stephen Chung
ccbbf3eb34 Enhance floating-point display. 2021-04-11 11:20:34 +08:00
Stephen Chung
c1c1e5f684 Use string start position as error position. 2021-04-11 11:19:46 +08:00
Stephen Chung
6b4553ffc8 Fix panic with unterminated interpolated string. 2021-04-10 17:47:44 +08:00
Stephen Chung
40fda5139d Support negative index counting from end. 2021-04-10 15:00:03 +08:00
Stephen Chung
716e9cf779 Fix string parsing state. 2021-04-10 11:11:42 +08:00
Stephen Chung
42555ac732 Unify string continuation parsing. 2021-04-10 10:20:17 +08:00
Stephen Chung
4aaf957d73 Gate doc-comment tokenizing. 2021-04-09 23:13:33 +08:00
Stephen Chung
29d186b361 Put doc-comments under metadata flag. 2021-04-09 22:49:47 +08:00
Stephen Chung
0f2e7e3825 Fix builds and tests. 2021-04-06 23:28:22 +08:00
Stephen Chung
f17a826f99 Refine debug print-out. 2021-04-06 23:18:41 +08:00
Stephen Chung
7ec49a9510 Fix f32_feature with serde. 2021-04-06 23:18:28 +08:00
Stephen Chung
131147c65d Optimize Fn construct. 2021-04-06 12:26:38 +08:00
Stephen Chung
d3cfb3c605 Optimize position in variable access. 2021-04-05 23:59:15 +08:00
Stephen Chung
94fc5af285 Store short index in variable access. 2021-04-05 23:06:48 +08:00
Stephen Chung
a3ee0f4245 Fix no_index build. 2021-04-05 18:32:20 +08:00
Stephen Chung
f5d3a0ef4f Promote expr block. 2021-04-05 14:57:07 +08:00
Stephen Chung
00784d39ad PropertyExpected for map literal with interpolated key. 2021-04-05 14:51:26 +08:00
Stephen Chung
26bb88974a Add function for string + char. 2021-04-05 00:10:08 +08:00
Stephen Chung
e6ea006ac6 Fix builds. 2021-04-05 00:05:56 +08:00
Stephen Chung
8956a77c8c Add new state in TokenizeState to switch back to text mode. 2021-04-04 23:23:10 +08:00
Stephen Chung
0807c474a1 Revise using string interpolation. 2021-04-04 23:22:45 +08:00
Stephen Chung
bc9c1ab850 Add external control interface for tokenizer. 2021-04-04 23:08:27 +08:00
Stephen Chung
20aaf1826a Fix builds. 2021-04-04 15:06:13 +08:00
Stephen Chung
e6c878edf3 Implement string interpolation. 2021-04-04 13:13:07 +08:00
Stephen Chung
f7ad1cec39 Fix builds. 2021-04-03 11:49:16 +08:00
Stephen Chung
b089d5b8f4 Fix bug in property setter op-assignment. 2021-04-03 11:12:35 +08:00
Stephen Chung
a738f750f9 Implement string functions with to_string/to_debug. 2021-04-02 19:26:55 +08:00
Stephen Chung
889edbef71 Allow cross-loading of relative file paths in FileModuleResolver. 2021-04-02 12:34:39 +08:00
Stephen Chung
98afb2e7d6 Fix feature builds. 2021-03-31 10:16:38 +08:00
Stephen Chung
a049f7b5ba Optimize data structures. 2021-03-30 23:55:29 +08:00
Stephen Chung
b14d18934a Add Dynamic::clone_cast. 2021-03-30 18:57:16 +08:00
Stephen Chung
e36e490a30 Support back-tick at EOL for literal strings. 2021-03-30 13:59:27 +08:00
Stephen Chung
d756b7bac6 Rename FnWrongDefinition to WrongFnDefinition. 2021-03-30 11:39:00 +08:00
Stephen Chung
d2ded7733a Add support for line continuation and multi-line string literals. 2021-03-30 00:21:09 +08:00
Stephen Chung
3a6e6848fd Fix serde build. 2021-03-29 18:46:32 +08:00
Stephen Chung
e306a92ea0 Change Map keys to Identifier. 2021-03-29 17:14:22 +08:00
Stephen Chung
41b48d591f Change to no_smartstring feature. 2021-03-29 17:13:54 +08:00
Stephen Chung
07efdddba3 Add smartstring default feature. 2021-03-29 13:40:33 +08:00
Stephen Chung
fc6c5ecd00 Fix no_closure builds. 2021-03-29 13:07:10 +08:00
Stephen Chung
60f8a7f91c Remove Float trait. 2021-03-29 11:36:15 +08:00
Stephen Chung
e5249cc1ae Extract Identifier type. 2021-03-29 11:36:02 +08:00
Stephen Chung
241f5abe10 Change function call name into ImmutableString from Cow<str>. 2021-03-28 23:06:59 +08:00
Stephen Chung
7bdc2e3d20 Extract constant arguments from function calls. 2021-03-28 19:04:25 +08:00
Stephen Chung
8e8c367034 Update deprecated methods with since attribute. 2021-03-28 17:04:16 +08:00
Stephen Chung
7825cb1c56 Support shebangs in scripts. 2021-03-28 16:36:56 +08:00
Stephen Chung
47588f9784 Fix codegen tests. 2021-03-27 08:12:13 +08:00
Stephen Chung
0afc2a0842 Reverse Module::set_plugin_fn. 2021-03-26 18:41:28 +08:00
Stephen Chung
33f88dc813 Fix sync build. 2021-03-26 16:57:28 +08:00
Stephen Chung
c443c3bb48 Gate codegen metadata output under metadata feature. 2021-03-26 10:59:34 +08:00
Stephen Chung
8ea218f907 Metadata pulls in serde. 2021-03-25 19:49:30 +08:00
Stephen Chung
adbb5f8eb8 Use static array for codegen parameters info. 2021-03-25 14:02:50 +08:00
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
c4fe1782df Streamline string handling. 2021-03-24 13:17:52 +08:00
Stephen Chung
3a1e93e324 Fix no_std build. 2021-03-24 10:38:56 +08:00
Stephen Chung
3d0d5d1708 Streamline code. 2021-03-24 10:02:50 +08:00
Stephen Chung
6d1700728a Intern module registration strings. 2021-03-24 09:56:25 +08:00
Stephen Chung
0d7f2c16cc Reduce indirections. 2021-03-23 20:04:54 +08:00
Stephen Chung
f9429c06f9 Use template for object map literal. 2021-03-23 18:25:40 +08:00
Stephen Chung
f70225ca1d Change HashMap to BTreeMap. 2021-03-23 12:13:53 +08:00
Stephen Chung
7a0032fc89 Move return type to param_names. 2021-03-22 23:11:23 +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
297a539528 Flatten function call arguments. 2021-03-20 23:57:43 +08:00
Stephen Chung
aa0594210c Use RhaiResult for plugin return. 2021-03-19 10:30:30 +08:00
Stephen Chung
1200ffcd2b Add test with &str parameter. 2021-03-17 22:32:22 +08:00
Stephen Chung
e2a66e0241 Fix doc tests. 2021-03-17 14:45:40 +08:00
Stephen Chung
6667a22c0c Code style and docs. 2021-03-17 13:30:47 +08:00
Stephen Chung
699131be58 New reserved keywords. 2021-03-17 10:31:50 +08:00
Stephen Chung
4581943435 Remove public_only parameters. 2021-03-17 09:58:08 +08:00
Stephen Chung
5172ade179 Code style edits. 2021-03-16 18:16:40 +08:00
Stephen Chung
082ecaa739 Fix feature builds. 2021-03-15 23:03:26 +08:00
Stephen Chung
a1549bb377 Allow register_result to return any type. 2021-03-15 22:37:50 +08:00
Stephen Chung
27953ef745 Register parameter type names. 2021-03-15 22:19:21 +08:00
Stephen Chung
6cbf771fdd Fix private function signature. 2021-03-15 21:30:55 +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
d9df6aabc8 Change precedence to own type. 2021-03-14 10:47:29 +08:00
Stephen Chung
008ef0a41b Fix feature builds. 2021-03-14 10:47:21 +08:00
Stephen Chung
4e3fdf6dab Revamp statement block optimization. 2021-03-13 23:43:05 +08:00
Stephen Chung
58d28fb468 Fix no-std build. 2021-03-13 19:08:49 +08:00
Stephen Chung
558ffeaf3e Add FnResolutionCacheEntry. 2021-03-13 18:46:08 +08:00
Stephen Chung
61b0c7b2b3 Optimize imports layout. 2021-03-12 22:30:08 +08:00
Stephen Chung
81ca86a8d2 Fix internals build. 2021-03-12 19:33:22 +08:00
Stephen Chung
b74d2ff2b4 Fix test. 2021-03-12 14:13:19 +08:00
Stephen Chung
85fcb74be9 Furtuer optimize data structure sizes. 2021-03-12 14:11:08 +08:00
Stephen Chung
4e5d009386 Inline scope entries. 2021-03-12 13:26:47 +08:00
Stephen Chung
c2a34bd518 Fix internals build. 2021-03-11 22:27:35 +08:00
Stephen Chung
7b8a4c46e7 Add ability to terminate AST walk. 2021-03-11 21:55:55 +08:00
Stephen Chung
b2fd0222de Refine statement block optimization. 2021-03-11 18:29:22 +08:00
Stephen Chung
99020f3ed1 Fix builds. 2021-03-10 23:37:04 +08:00
Stephen Chung
9b37d84a9b Enable/disable caching in FileModuleResolver. 2021-03-10 23:01:04 +08:00
Stephen Chung
728ed81173 Optimize layout. 2021-03-10 22:12:48 +08:00
Stephen Chung
874b3fc843 Fix metadata build. 2021-03-10 14:10:04 +08:00