Kiryl Dziamura
3e5cfb546d
check if when branch is suffixed
2024-06-03 23:45:54 +02:00
Kiryl Dziamura
8883ab9a91
Desugar expect continuation
2024-06-03 16:58:31 +02:00
Kiryl Dziamura
e86c6235c1
add multiple args test
2024-05-28 11:34:01 +02:00
Kiryl Dziamura
ce6e21ff7a
ignore def pattern for function args
2024-05-27 18:21:00 +02:00
Luke Boswell
9a7b62ac22
handle dbg when unwrapping suffixed !
2024-05-04 21:37:47 +02:00
Agus Zubiaga
a8a829aadd
Merge branch 'main' into inline-imports
2024-04-28 00:11:29 -03:00
Luke Boswell
20f277c132
update later tests
2024-04-28 08:47:08 +10:00
Luke Boswell
db4607125b
remove suffixed from Pattern
2024-04-28 08:47:08 +10:00
Luke Boswell
2fe03e6c91
remove suffixed from Expr::Var
2024-04-28 08:47:08 +10:00
Luke Boswell
1640ee1321
update logic for Expr::TaskAwaitBang
2024-04-28 08:47:08 +10:00
Agus Zubiaga
f69bc2e46f
Merge branch 'main' into inline-imports
2024-04-23 18:57:20 -03:00
Luke Boswell
84cd4233be
clippy fix
2024-04-22 18:55:34 +10:00
Luke Boswell
32c4083364
add new tests for trailing !
2024-04-22 18:38:26 +10:00
Agus Zubiaga
5112e064e5
Add module_path to can env instead of threading it through
2024-04-21 10:30:34 -03:00
Agus Zubiaga
1f347f6ca1
Fix package module resolution in inline imports
...
We were still passing `ModuleIds` from `load` to `can`, but now
that imports can appear in any scope, we don't know which package
an unqualified module name belongs to from the top level.
We now pass `PackageModuleIds` instead and keep a Map of `ModuleName` to
`ModuleId` in `Scope`.
This also allow us to import multiple modules with the same name from different
packages as long as a unique alias is provided.
2024-04-20 12:16:37 -03:00
Agus Zubiaga
d5a38a26db
Merge branch 'main' into inline-imports
2024-04-20 12:01:11 -03:00
Richard Feldman
6059f7afcb
Merge pull request #6651 from roc-lang/fix-nesting-suffix
...
Fix recursion for suffixed `!` in top-level def
2024-04-19 14:53:34 -04:00
Luke Boswell
5e738a4ab5
fix recursion in top-level def
2024-04-19 10:34:33 +10:00
Luke Boswell
ae908f89a9
suffixed when branches
2024-04-18 12:47:11 +10:00
Luke Boswell
a889810dfd
unwrap suffixed when condition
2024-04-18 09:44:57 +10:00
Luke Boswell
0198a683c7
fix unwrapping of trailing expr
2024-04-17 09:54:29 +10:00
Luke Boswell
7a84dcd39c
don't unwrap intermediate answer if not required
2024-04-16 16:25:20 +10:00
Luke Boswell
7c94e4db04
cargo fmt
2024-04-15 14:38:20 +10:00
Luke Boswell
ee42dfc317
add support for if-then-else
2024-04-15 14:20:49 +10:00
Luke Boswell
2a222f3a51
optimise by not unwrapping sometimes
2024-04-15 10:02:03 +10:00
Luke Boswell
7886d30b8e
parse/unwrap nested defs
2024-04-15 09:25:00 +10:00
Luke Boswell
93ef5e42dc
fix tests, make clippy happy
2024-04-14 13:45:07 +10:00
Luke Boswell
f9fb59f0c2
cleanup and refactor suffixed tests
2024-04-14 13:45:07 +10:00
Luke Boswell
0143035dc0
cleanup, improve docs
2024-04-14 13:45:06 +10:00
Luke Boswell
c32fa5b600
support optional suffied last def
2024-04-14 13:45:06 +10:00
Luke Boswell
bd264eb5c3
add new tests
2024-04-14 13:45:06 +10:00
Luke Boswell
5bb44fcce5
most tests passing
2024-04-14 13:45:05 +10:00
Luke Boswell
f1d568b848
WIP try simplification
2024-04-14 13:45:05 +10:00
Luke Boswell
8b9e08bd76
WIP try simplification
2024-04-14 13:45:05 +10:00
Luke Boswell
e74501981e
fmt and clippy fixes
2024-03-20 12:31:04 +11:00
Luke Boswell
3b2e9e36b8
rename operator.rs to desugar.rs
2024-03-17 15:57:27 +11:00
Anton-4
3c7a834da1
update to new interpolation syntax
2024-02-02 13:39:10 +01:00
Agus Zubiaga
002493e32c
Load and can ingested file imports
...
Moves handling of ingested file imports from load to can, so that they
can be properly introduced in the scope they appear.
Example:
import "input.txt" as input : Str
image =
import "image.png" as bytes : List U8
# `bytes` is only available under `image`
decodePng bytes
...
2024-01-20 08:43:40 -03:00
Richard Feldman
163bde0c41
Update tests to use $(...) interpolation
2024-01-06 15:06:30 -05:00
Anton-4
1126f85b5a
fix clippy unnecessary hashes
2024-01-01 16:38:36 +01:00
Anton-4
cd632fe549
Merge branch 'main' of github.com:roc-lang/roc into clippy-1.74
2023-12-25 17:05:37 +01:00
Brendan Hansknecht
3966d63e2f
add src and location to dbg
2023-12-02 21:18:31 -08:00
Folkert
88575b2140
fix 2 comment // in a row (clippy thinks you mean a doc comment; we don't
2023-11-18 22:39:34 +01:00
Folkert
ef39bad7c6
auto clippy fixes
2023-07-10 18:27:08 +02:00
Ajai Nelson
2e5fef5231
Improve error messages involving ignored variables
...
Fix #3987
2023-06-06 19:46:15 -04:00
Agustin Zubiaga
23db4a5e87
Update tests to new record builder syntax
2023-05-17 11:47:34 -03:00
Agustin Zubiaga
c43ff03e41
Prevent record builder field names from shadowing other symbols
2023-05-16 13:48:41 -03:00
Agustin Zubiaga
088193c93b
Fix clippy error
2023-05-08 22:18:56 -03:00
Agustin Zubiaga
d2a57112fd
Unapplied record builder error
2023-05-08 20:16:38 -03:00
Agustin Zubiaga
6670fbb1ab
Multiple record builder error
2023-05-08 19:26:47 -03:00