Commit Graph

449 Commits

Author SHA1 Message Date
f510cce0ee Pass analyzer test 2024-08-23 12:16:56 -04:00
6a488c2245 Improve constructors 2024-08-23 11:44:47 -04:00
de3c83a6f5 Pass analyzer tests 2024-08-23 07:36:10 -04:00
e84bb2ea70 Improve errors 2024-08-23 05:54:58 -04:00
0d0a2d2237 Add character literal tokens; Change strings to double quotes only 2024-08-23 05:24:48 -04:00
23782c37a3 Complete value overhaul 2024-08-23 03:04:11 -04:00
87bced9719 Begin changing value type 2024-08-23 01:12:20 -04:00
956def5ec6 Clean up 2024-08-20 19:44:22 -04:00
e1e40cf931 Pass analyzer tests 2024-08-20 19:20:38 -04:00
e22d0254f5 Pass analyzer test 2024-08-20 18:48:25 -04:00
08a9b265ec Improve errors 2024-08-20 17:01:30 -04:00
80bf09d807 Clean up 2024-08-20 15:55:35 -04:00
2eff51815a Get hello world working again 2024-08-20 15:43:50 -04:00
a6334070ae Get fizzbuzz working again 2024-08-20 15:16:06 -04:00
f9480ddc24 Add loop and break 2024-08-20 14:45:43 -04:00
169c1a9e3f Pass tests 2024-08-20 12:24:41 -04:00
4846b3f74d Fix parsing bug that fixes garbage collection bug 2024-08-20 12:09:17 -04:00
2e7acbeb64 Add parent contexts and core library 2024-08-20 11:40:37 -04:00
83f856385b Refine errors and error propagation 2024-08-20 11:07:13 -04:00
cf9a9837c8 Add a parser test; Pass VM test 2024-08-20 07:20:44 -04:00
8b5eb9977c Clean up 2024-08-20 04:38:15 -04:00
c0ab5a84a2 Pass VM tests 2024-08-20 04:12:43 -04:00
d5c2ae92c9 Pass VM test 2024-08-20 03:28:13 -04:00
fab66a4877 Pass VM test 2024-08-20 02:25:22 -04:00
e3d821a1c3 Remimplement features 2024-08-20 00:15:19 -04:00
0fd19a623d Improve AST ergonomics 2024-08-17 12:15:47 -04:00
0b64afccb1 Extend VM, abstract tree and parser 2024-08-17 10:07:38 -04:00
fa67a568d9 Pass parser tests; Fix garbage collection 2024-08-17 05:32:18 -04:00
b024d81148 Continue reimplementing the language 2024-08-17 04:06:13 -04:00
207d155a25 Add basic analyzer implementation 2024-08-16 23:18:05 -04:00
447643f315 Expand Value and Expression 2024-08-16 22:43:29 -04:00
8ae453add7 Continue value overhaul 2024-08-16 17:07:49 -04:00
8bff39a7db Prepare for value overhaul 2024-08-16 11:21:20 -04:00
7d721beb31 Implement VM and Analyzer by using the new AST 2024-08-16 09:22:36 -04:00
fedefdb29f Implement "let" and "let mut" lexing/parsing 2024-08-16 07:09:46 -04:00
84429ef187 Implement operator expressions in the VM 2024-08-16 06:43:29 -04:00
e911853cb5 Clean up 2024-08-16 05:24:55 -04:00
bfb07047a5 Implement VM 2024-08-16 05:14:00 -04:00
26348fb82e Continue implementing the VM 2024-08-16 00:41:52 -04:00
b48b5d4369 Begin reimplementing the VM 2024-08-15 23:17:49 -04:00
40b5d15b96 Add parser mode to pass tests 2024-08-15 21:34:47 -04:00
44d6a88faa Pass tests 2024-08-15 21:22:24 -04:00
486530610b Continue passing tests and tweaking 2024-08-15 00:20:36 -04:00
81b7888920 Continue passing tests 2024-08-14 21:15:37 -04:00
f4ee3ffcf8 Continue passing tests 2024-08-14 19:43:12 -04:00
441df54a44 Continue passing tests 2024-08-14 18:30:36 -04:00
f4d29eca38 Begin passing tests again 2024-08-14 16:07:32 -04:00
fdf324c866 Continue AST overhaul 2024-08-14 15:52:04 -04:00
43b2393d8a Begin AST overhaul 2024-08-14 14:28:39 -04:00
e7b5390a55 Add more value mutability 2024-08-14 04:59:27 -04:00
8666f1cd9b Add parsing for mutable assignment 2024-08-14 03:53:15 -04:00
3ff3a7568c Continue adding mutable variables 2024-08-14 01:13:43 -04:00
535e120256 Add mutable values 2024-08-14 01:03:46 -04:00
17286896a8 Add async blocks 2024-08-13 23:45:17 -04:00
d32633272c Add docs and an unused function for fun 2024-08-13 22:57:37 -04:00
58780b5530 Write docs and clean up 2024-08-13 22:25:33 -04:00
64a3ce4cd3 Implement subtraction assignment 2024-08-13 21:24:56 -04:00
5c8e72a6f7 Implement fields struct instantiation 2024-08-13 19:41:36 -04:00
b55a79d6bf Add parsing for fields structs 2024-08-13 18:48:02 -04:00
a78d560a0d Add docs 2024-08-13 18:27:03 -04:00
5757f52dbd Refactor to move assingment out of other binary operations 2024-08-13 17:34:45 -04:00
b1337900fb Add analysis to prevent tuple structs with wrong types 2024-08-13 16:46:54 -04:00
83aa53b998 Add instantiation for tuple structs 2024-08-13 16:22:40 -04:00
049790726a Add parsing for tuple structs 2024-08-13 15:12:32 -04:00
1d75bd6594 Add instantiating unit structs 2024-08-13 14:21:31 -04:00
7e7448fe52 Add parsing for unit struct defintions 2024-08-13 13:54:16 -04:00
87455ed792 Continue adding struct lexing and test 2024-08-13 13:28:22 -04:00
2b8dda14e3 Add anaylsis to check for valid fields and indexes 2024-08-13 13:12:13 -04:00
40a71da3a5 Fix identifier caching; Add docs; Add minor fixes 2024-08-13 12:23:25 -04:00
f3bef42563 Write some failing analyzer tests 2024-08-12 19:39:26 -04:00
390511fa20 Rewrite list indexing to use [] syntax 2024-08-12 19:06:57 -04:00
5ad6012021 Refine parsing and lexing 2024-08-12 16:57:10 -04:00
0fb0b63a97 Fix dot notations precedence; Add some miscellaneous expansions 2024-08-12 15:02:04 -04:00
a61c1756f2 Begin fixing map property parsing 2024-08-12 11:24:24 -04:00
f62cb13089 Allow indexing lists with ranges 2024-08-12 10:43:18 -04:00
2a0737fd45 Add test; Clean up context 2024-08-12 10:29:06 -04:00
0ba54e9717 Add another token type; Add ranges 2024-08-12 10:08:34 -04:00
755fe5d899 Refactor to use parser's 'parse_block' method 2024-08-12 09:06:42 -04:00
c71c4d2d07 Refactor VM to own its context 2024-08-12 08:54:21 -04:00
bf11bd1f0f Fine-tune pratt parsing to support more complexity 2024-08-12 08:35:08 -04:00
c56a187d05 Add parser tests for new unary operations 2024-08-12 06:00:14 -04:00
2c374a1cd7 Begin adding unary operators 2024-08-12 05:44:05 -04:00
74cfef1832 Work out the finer details of the garbage collector 2024-08-12 04:10:07 -04:00
0e3a3e94c8 Add context tests 2024-08-11 22:47:52 -04:00
2463e44301 Test and implement basic garbage collection 2024-08-11 22:41:40 -04:00
78228ce8d6 Add new analyzer and vm tests 2024-08-11 22:02:17 -04:00
f2c0786bfb Simplify "run" function 2024-08-11 21:42:16 -04:00
de30f241a8 Refactor function call dot notation; Add better analysis of function calls and property access 2024-08-11 21:37:44 -04:00
c0254e8a94 Refactor to use type checking 2024-08-11 19:18:13 -04:00
77814c4576 Begin refactoring to use type checking 2024-08-11 19:00:37 -04:00
7259206c98 Add analyzing built-in function calls 2024-08-11 18:11:59 -04:00
3a2dd28efb Improve error layout 2024-08-11 18:01:35 -04:00
3b0c74010e Rename modules 2024-08-11 17:24:05 -04:00
f5836b66dc Clean up 2024-08-11 16:57:52 -04:00
9a9d9458ae Clean up block/map parsing code 2024-08-11 15:39:42 -04:00
9338d73621 Add to_string function; Get fizzbuzz example working 2024-08-11 15:12:19 -04:00
28c65b0715 Clean up control flow code in the VM; Remove returns from if and if/else_if statements 2024-08-11 15:03:26 -04:00
0c73f80947 Implment control flow lexing and parsing 2024-08-11 14:35:33 -04:00
24e21aa0b5 Add test; Attempt to clean up map and block parsing 2024-08-11 13:16:16 -04:00
37e3e1116d Add while loops 2024-08-10 05:23:43 -04:00
1687fd7fe3 Clean up; Add an analyzer test 2024-08-10 04:45:30 -04:00
a46e5dd365 Fix remaining doc tests 2024-08-10 04:32:27 -04:00
8f0d07b546 Fix parsing bug and some docs tests 2024-08-10 04:29:46 -04:00
f2823b6236 Tweak operator precedence 2024-08-10 00:14:38 -04:00
2ae75dcdd0 Make meticulous changes to pratt parser 2024-08-10 00:01:50 -04:00
9ea203f419 Use context and replace old variable map 2024-08-09 21:12:36 -04:00
e1b04328d5 Add context 2024-08-09 20:52:13 -04:00
f50b765c1e Clean up 2024-08-09 20:24:18 -04:00
82fbf796f3 Implement postfix parsing 2024-08-09 18:14:46 -04:00
60f8aab805 Refactor pratt parser 2024-08-09 14:01:01 -04:00
ed82f3c64f Lex, parse and run maps and blocks 2024-08-09 11:41:23 -04:00
f389f7e422 Implement equality operation 2024-08-09 07:15:09 -04:00
24a2642f17 Add modulo support 2024-08-09 07:02:55 -04:00
2cf580d111 Add division 2024-08-09 06:46:24 -04:00
a048577143 Improve assignment parsing 2024-08-09 06:32:44 -04:00
929468338d Add map parsing 2024-08-09 06:09:59 -04:00
55a8661618 Begin adding maps 2024-08-09 05:18:39 -04:00
d0dba35285 Add && and || operators 2024-08-09 04:56:24 -04:00
8c8fde94ce Refactor the abstract syntax tree 2024-08-09 04:23:02 -04:00
b9081f8653 Add comparison statement to replace four separate statements 2024-08-09 03:00:48 -04:00
580b85e2d0 Clean up tokens 2024-08-09 01:55:34 -04:00
83018ec5ec Improve error reports 2024-08-09 01:43:58 -04:00
c1b71ffccc Refactor errors and clean up read_line 2024-08-09 00:49:17 -04:00
9766777a47 Expand lexing of complex floats 2024-08-09 00:31:38 -04:00
60bd8f5352 Implement subtraction and multiplication 2024-08-08 23:28:47 -04:00
57782d3ed6 Clean up docs 2024-08-08 22:44:34 -04:00
cccbe7a325 Write docs 2024-08-08 21:59:09 -04:00
77134e5292 Begin adding fancy errors 2024-08-08 21:47:49 -04:00
4805a53269 Begin expanding errors 2024-08-08 20:58:56 -04:00
fa2ce8a0bf Refactor TokenOwned and add some docs 2024-08-08 20:22:27 -04:00
bf519ec087 Borrow string slices instead of copying them in lexing 2024-08-08 16:19:14 -04:00
1c24286696 Improve identifier cache 2024-08-08 14:58:12 -04:00
d5d51e9849 Clean up 2024-08-08 13:57:53 -04:00
a52e78150e Add lexing and parsing for I/O built-in functions; Refactor built-in function parsing 2024-08-08 13:49:40 -04:00
8dd62e623e Refactor add statement analysis to allow strings 2024-08-08 13:21:27 -04:00
a639641ed2 Parse strings and string concatentation 2024-08-08 13:11:32 -04:00
097b09b6e3 Lex strings and string concatenation 2024-08-08 13:08:53 -04:00
f5e822e916 Add and pass analyzer tests 2024-08-08 13:01:25 -04:00
e4ea402dfa Move built-in functions to a separate module 2024-08-07 19:44:01 -04:00
9840c3c193 Clean up and add docs 2024-08-07 19:12:40 -04:00
1fe26e0296 Remove generic position from nodes and replace with Spans 2024-08-07 19:03:50 -04:00
35eca1f7b4 Clean up 2024-08-07 18:46:40 -04:00
285e9e7217 Implement is_odd and length functions; Pass all tests 2024-08-07 18:43:24 -04:00
b17da5ad3c Get built-in functions working 2024-08-07 18:39:28 -04:00
4d7f59aee2 Begin implementing better built-in features 2024-08-07 18:24:25 -04:00
06f3a9b746 Remove built-in value statements 2024-08-07 15:53:43 -04:00
cda0203242 Replace spans with a generic type 2024-08-07 15:47:37 -04:00
76a67c5117 Add parse examples 2024-08-07 12:32:18 -04:00
e295aebf56 Add examples 2024-08-07 12:13:49 -04:00
f64babc546 Add more analysis to the analyzer 2024-08-07 11:57:15 -04:00