Mark
dab8fd9584
add missing files
2024-03-22 15:39:02 +01:00
Mark
8690263b1c
V7: Make .try
a language feature, this makes try_allow_unused unnecessary. remove try and try_... functions.
2024-03-22 15:38:09 +01:00
Mark
86b6a46d09
add Type::add_all()
2024-03-03 12:55:55 +01:00
Mark
f3dc26a5a7
fix tuple type parsing and fix examples
2024-02-22 20:21:11 +01:00
Mark
dc2db1d0e8
make list.get_mut return a 1-tuple on success, and fix reference type being incomplete
2024-02-22 19:41:03 +01:00
Mark
05c88b7826
fix variable shadowing not working (how was this not noticed until now??)
2024-02-22 19:13:50 +01:00
Mark
4fb84741ef
.
2024-02-22 16:31:05 +01:00
Mark
f3f2c13702
add loop syntax, remove loop function, change CLI
2024-02-22 13:34:02 +01:00
Mark
931f70fe4c
add example 02 to mers_lib
2024-02-17 14:57:40 +01:00
Mark
cc4a4366c9
mers_lib to 0.5.0, readme updated
2024-02-17 14:06:19 +01:00
Mark
0c87c69743
add examples, prepare for new readme
2024-02-17 13:23:50 +01:00
Mark
d124bff77f
drop stdin on childproc_await to prevent deadlocks, add flush() call after childproc_write_*
2024-02-17 12:06:04 +01:00
Mark
6fdfba82a0
add childproc_write_* functions
2024-02-17 11:59:56 +01:00
Mark
5d752c9969
change parse_int/float and debug, add spawn_command and childproc_* functions
2024-02-17 11:46:07 +01:00
Mark
5d3efe4788
version bump to 0.4.0
2024-02-15 10:56:34 +01:00
Mark
6d6853cc9f
add function type annotation (Input1 -> Output1, Input2 -> Output2)
2024-02-15 10:55:13 +01:00
Mark
c130678caf
Change reference type syntax from &{t/y/p/e} to &[t/y/p/e] to avoid ambiguity with &{my: Int, object: String}
2024-02-15 09:30:00 +01:00
Mark
b85183d081
remove COW::Get debug print from debug builds
2024-02-15 09:21:31 +01:00
Mark
44da27b414
Add chain
function and chained
iterator, which behaves like Rust's flatten
2024-02-14 17:13:05 +01:00
Mark
0226dbd02b
add missing file, bump version
2024-01-31 19:23:01 +01:00
Mark
42ca5ae3f0
refine string functions in stdlib
2024-01-31 19:20:22 +01:00
Mark
b9df3fc76f
bump minor version
2024-01-16 12:07:46 +01:00
Mark
16cdcddc72
.
2024-01-16 12:06:55 +01:00
Mark
9fe981fc6c
fix bug where subtypes of list didn't include type of empty list
2024-01-16 12:00:16 +01:00
Mark
2d373d1ba7
make some types/fields public
2024-01-16 10:38:45 +01:00
Mark
8c235a98aa
update readme
2024-01-11 13:18:54 +01:00
Mark
5be264e63c
prepare to publish to crates.io
2024-01-11 13:05:52 +01:00
Mark
c08e08f8a9
add try_allow_unused function
2023-12-18 12:07:08 +01:00
Mark
49d13d92cc
improve error messages
...
- fix bug where `thread` function wouldn't error when being called on a non-function
- add compile error when a function in `try` is never used, because this is almost certainly a mistake and will cause mers to unexpectedly go down the "wrong" code path.
- some small changes so mers_lib can be used in another project
2023-12-14 19:24:43 +01:00
Mark
d70e7ec066
fix bug in hooks...
...
...that prevented the language server from seing inner statements of functions
2023-12-07 09:22:19 +01:00
Mark
d3164254b3
improve support for #include in language server
2023-12-06 18:58:10 +01:00
Mark
0759b769e0
early prototype of a language server
...
currently only provides hover info (but that's already quite useful for debugging)
2023-12-05 23:04:17 +01:00
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
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
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
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
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
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
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
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
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
Mark
42288494f0
fix product function and add examples
2023-10-19 19:38:13 +02:00
Mark
b39a768099
.
2023-10-19 18:46:15 +02:00
Mark
2d79e75ba2
added len function
2023-08-19 23:35:29 +02:00
Mark
ae0e163595
assigning to tuples should work properly now
2023-08-15 19:18:52 +02:00
Mark
2a7cb08596
mers rewrite is starting to be usable
2023-08-14 17:17:08 +02:00
Mark
07745488b3
sorted mers_lib/src/program/configs/ and added cargo features
2023-07-28 15:20:02 +02:00
Mark
b81dac682e
full rewrite, kinda works
2023-07-28 00:33:15 +02:00