Commit Graph

287 Commits

Author SHA1 Message Date
Mark
8b60da8d99 relative paths in #include are relative to the file's parent directory, if possible 2023-12-05 09:55:00 +01:00
Mark
0aca8e5b25 fix bug where parsing () and {} types wouldn't work as expected 2023-11-30 20:18:11 +01:00
Mark
342874bf4d add Objects to readme 2023-11-30 17:55:44 +01:00
Mark
d21715c2d3 fix { x := ... } being interpreted as an object 2023-11-30 17:53:41 +01:00
Mark
48c1381194 Object field order matters! 2023-11-30 17:48:24 +01:00
Mark
3d1ce384d0 add objects and object types 2023-11-30 15:44:51 +01:00
Mark
9c0d55788f change debug function 2023-11-30 11:44:20 +01:00
Mark
782460e472 add get_mut function for lists 2023-11-29 16:26:51 +01:00
Mark
479b619388 change isn't to is in an example (whoops) 2023-11-25 17:51:37 +01:00
Mark
357037f93b add helix editor language config 2023-11-24 19:35:43 +01:00
Mark
c8431cab93 add experimental tree-sitter grammar 2023-11-24 19:19:54 +01:00
Mark
0a9eea2045 fix bug where error would reference wrong file 2023-11-24 13:19:38 +01:00
Mark
12af47d18a fix bug where #include included files would be able to access local variables and custom types. now, only globals are shared. 2023-11-24 12:51:54 +01:00
Mark
4144d6cf71 Type Annotations
- Add type annotations: [type] statement
- Add type definitions: [[name] type], [[name] := statement]
- Add type annotations example (08)
- add Quickstart.md, reference it from README
2023-11-21 22:10:58 +01:00
Mark
b6d708db3d improve/fix errors in #include 2023-11-17 10:09:44 +01:00
Mark
12925fed67 improved error messages
- some small bugs are now fixed
- include comments in error messages (if this causes issues, use --hide-comments)
- colors should make more sense now
- error-related things moved to mers_lib/src/errors/
2023-11-16 14:50:09 +01:00
Mark
c39e784939 better errors, colors, and fix bug where x := x would panic 2023-11-16 13:09:17 +01:00
Mark
39951a59e9 add #include 2023-11-15 17:55:07 +01:00
Mark
e851559016 add thread example 2023-11-13 14:15:00 +01:00
Mark
fcd70c8dc4 improve iter types 2023-11-10 13:49:18 +01:00
Mark
8bdd6e00e8 Add lock_update function for safer multithreading
&v = (v, 1).sum might fail if two threads do it at the same time or something, so you can now lock the reference to ensure no other thread messes with your data while you update its value
2023-11-10 13:18:34 +01:00
Mark
68d5b55c6f make TicTacToe example slightly more elegant 2023-11-09 15:22:00 +01:00
Mark
eb07754e86 Add TicTacToe example 2023-11-09 15:18:29 +01:00
Mark
d2fc8c1ebe Add division to examples/03 and add any and all functions for Iter<Bool> 2023-11-08 15:54:46 +01:00
Mark
39fca08541 change loop function so you can write ().loop(() -> do_smth) 2023-11-08 15:11:28 +01:00
Mark
cab81059f3 update examples 2023-11-07 20:24:20 +01:00
Mark
db59a1e92e remove diff, add subtract to replace it and work with iters, add lt, gt, ltoe, gtoe for < > <= >= 2023-11-07 18:37:37 +01:00
Mark
79660c1976 added stdio::flush so that we can print partial lines using print/eprint 2023-10-28 14:15:52 +02:00
Mark
2c9fb1b4a4 fix bug 2023-10-28 14:07:10 +02:00
Mark
59e36d1535 added sleep function 2023-10-28 14:00:03 +02:00
Mark
cabbdc1764 multithreading v2 2023-10-28 13:48:46 +02:00
Mark
d72de43aad fix spelling mistake 2023-10-28 12:53:12 +02:00
Mark
577ef510ce error display underline now includes a.f(b) (b) part 2023-10-27 19:57:45 +02:00
Mark
cfa5a5e43e fix bug and change char in underline for error display 2023-10-27 19:47:55 +02:00
Mark
b914b11af6 include a.f(b) syntax 2023-10-27 19:24:54 +02:00
Mark
078b83dfa5 add/change examples 2023-10-27 19:19:42 +02:00
Mark
a30ba84691 more iter functions 2023-10-27 19:19:29 +02:00
Mark
6077de8370 fix get having completely wrong output type. whoops. 2023-10-27 17:31:05 +02:00
Mark
c652c618d2 fix get having wrong return type 2023-10-27 17:17:27 +02:00
Mark
cb52c961a2 fix todo!()s in with_iters 2023-10-27 17:09:48 +02:00
Mark
36e0f69d0c improve function type display 2023-10-27 14:56:01 +02:00
Mark
3b179ba2d4 adjust &list.pop return type to match actual return type 2023-10-27 14:45:37 +02:00
Mark
6618a4c00d remove eprintln 2023-10-27 14:36:21 +02:00
Mark
6f36ded38c fix bug when redeclaring a variable 3 times in the same scope 2023-10-27 14:35:10 +02:00
Mark
1384222b59 len function now works on lists because it works on all iterators 2023-10-27 14:22:14 +02:00
Mark
e60714e020 add support for a.f(b, c, d) syntax 2023-10-27 14:21:56 +02:00
Mark
09fbf2ab0a add GCD example 2023-10-27 13:50:26 +02:00
Mark
fd2a3382fc fixed tuple reversing type order when initializing
and try's error message now starts counting at Function #1 instead of #0.
2023-10-24 20:04:14 +02:00
Mark
5e20f92849 Added the concept of subtypes ...
... which `try` now uses to avoid some problems with inner types
2023-10-24 09:31:49 +02:00
Mark
ea95a16c30 added better error messages inspired by rustc/cargo
but not as good
2023-10-23 21:48:15 +02:00