Commit graph

6496 commits

Author SHA1 Message Date
Elias Mulhall
2242e9b2c3 Remove error handling for dbg in expression position 2024-08-28 11:53:44 -04:00
Elias Mulhall
9dae102603 Allow dbg expression inside string interpolation 2024-08-28 11:53:44 -04:00
Elias Mulhall
220bb55048 Desugar dbg expression into a dbg statement
Use a temporary variable to print and then return the body of the dbg
expression.
2024-08-28 11:53:44 -04:00
Elias Mulhall
335265e15c Parse dbg in expression position
Add dbg parsing logic everywhere we parse normal expressions. Add
special case to statement parsing to handle a series of statements
ending in a `dbg` in expression position.

Rename existing `dbg_help` function to `dbg_stmt_help`, similarly rename
syntax snapshot test files to specify which ones are for dbg statements.
2024-08-28 11:53:44 -04:00
Elias Mulhall
43d932df3b Update parser AST to support dbg as both a statment and expression
Make `Expr::Dbg` node specific to dbg expressions, add `Expr::DbgStmt`
for dbg statements. Debug expressions don't have a continuation branch.
Support formatting both kinds of `Dbg` nodes.
2024-08-28 11:53:44 -04:00
Elias Mulhall
a16f757164 Pass var_store into desugar_expr so that desugaring may generate fresh vars 2024-08-28 11:53:44 -04:00
Elias Mulhall
dc5c8aeaf9 cargo fmt --all 2024-08-28 11:53:44 -04:00
Elias Mulhall
3120a1ea46 Replace panic! with internal_error! 2024-08-28 11:53:44 -04:00
Anton-4
ed01e521f0
add roc check tip
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-08-27 20:29:12 +02:00
Brendan Hansknecht
7997cf95e7
ensure alignment is never 0. Must be at least 1. 2024-08-25 11:48:46 -07:00
Anton-4
44b8abdead
update to basic-cli 0.14 2024-08-23 15:50:05 +02:00
Brendan Hansknecht
cf5cd84d60
fix alignment of 16 bytes 2024-08-21 09:04:07 -07:00
Sam Mohr
7c7485bb04
Merge pull request #7005 from smores56/deprecate-backpassing
Deprecate backpassing to prepare for eventual removal
2024-08-18 08:08:29 -04:00
Joshua Warner
6b6968632f
Merge branch 'main' into format-invisible-chars 2024-08-17 10:22:40 -07:00
Aidan
ade416dbb4
add test for blank chars in multiline string 2024-08-17 10:28:15 -04:00
Aidan
de6a31263a
DRY up my new normalize code 2024-08-17 10:23:22 -04:00
Aidan
aef9d81eaa
simplify StrLiteral::Line to StrLiteral::PlainLine in block strings as well 2024-08-17 10:06:50 -04:00
Aidan
1551d8fb0d
preserve multiline string trailing whitespace 2024-08-17 09:57:59 -04:00
Sam Mohr
7c90a3a900
Remove vestigial backpassing test 2024-08-16 23:51:07 -07:00
Sam Mohr
d66f581eeb
Merge pull request #7002 from smores56/record-update-shorthand
Implement `&foo` record updater syntax sugar
2024-08-17 02:15:03 -04:00
Sam Mohr
50f6e11423
Deprecate backpassing to prepare for eventual removal 2024-08-16 22:36:04 -07:00
Aidan
7be537dd55
format invisible characters in strings to unicode escapes 2024-08-17 01:16:58 -04:00
Aidan
b0be698354
simplify StrLiteral::Line to StrLiteral::PlainLine when possible 2024-08-17 01:16:51 -04:00
Sam Mohr
e169529ede
Remove barely used zstd dependency 2024-08-16 10:10:29 -07:00
Sam Mohr
209d78f72c
Minor formatting fix 2024-08-16 01:52:56 -07:00
Sam Mohr
b1a972ab21
Implement &foo record updater syntax sugar 2024-08-16 01:41:59 -07:00
Sam Mohr
a14a110293
Merge pull request #7000 from smores56/try-suffix-ast-node
Combine ! and ? into single TrySuffix AST node
2024-08-15 09:31:59 -07:00
Sam Mohr
0fd0cc11aa
Format code 2024-08-14 22:26:32 -07:00
Sam Mohr
3bc5c1dc12
Combine ! and ? into single TrySuffix AST node 2024-08-14 22:14:08 -07:00
Luke Boswell
172b30ff54
Merge pull request #6998 from roc-lang/macos-codesign
use macos codesign
2024-08-15 07:32:30 +10:00
Anton-4
47978c8a20
use macos codesign
Anaconda also has a codesign and we want to use the macos one, see https://github.com/pyinstaller/pyinstaller/issues/8581#issuecomment-2147311833

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-08-14 17:01:17 +02:00
Luke Boswell
2eb3e38b7f
Merge remote-tracking branch 'remote/main' into result-map-builtins 2024-08-14 17:26:10 +10:00
Luke Boswell
6bae15c467
resolve review comments 2024-08-14 17:24:12 +10:00
Luke Boswell
45f18bd64e
update mono snapshots 2024-08-14 13:17:52 +10:00
Luke Boswell
7aebee8c94
implement Result.mapBoth and Result.map2 builtins 2024-08-14 13:16:24 +10:00
Luke Boswell
a5ae2608ea
fix incorrect name from merge 2024-08-14 09:13:57 +10:00
Luke Boswell
5c43bd2cee
Merge remote-tracking branch 'remote/main' into rebuild-platform 2024-08-14 09:12:12 +10:00
Joshua Warner
2d9aa00771
Rename RemoveSpaces->Normalize 2024-08-12 23:05:55 -07:00
Joshua Warner
6835041a61
Normalize string encoding as part of RemoveSpaces 2024-08-12 23:05:45 -07:00
Agus Zubiaga
b451e69b20
Merge branch 'main' into typecheck-module-params 2024-08-12 22:27:16 -03:00
Joshua Warner
0abea91796
Rename Full -> FullAst 2024-08-10 16:06:01 -07:00
Joshua Warner
d25c048d48
Move Full from fmt to parse and reorganize confusingly-named Module ast type 2024-08-07 23:01:49 -07:00
Agus Zubiaga
762799052e
Merge branch 'main' into typecheck-module-params 2024-08-07 18:55:33 -03:00
Sam Mohr
698bbc3cf1
Merge pull request #6968 from smores56/ignored-record-builder-fields
Ignore underscore-prefixed fields in record builders
2024-08-06 23:36:27 -07:00
Sam Mohr
00bc699642
Add syntax tests for record builder 2024-08-06 22:49:35 -07:00
Sam Mohr
cb8040f629
Ignore underscore-prefixed fields in record builders 2024-08-06 22:49:35 -07:00
Agus Zubiaga
7027547182
Load platform dependencies
We were dropping packages from the platform header while loading.

Closes #6931
2024-08-06 18:15:28 -03:00
Anton-4
ed4e831347
fmt Num.roc 2024-08-05 11:55:53 +02:00
Anton-4
dd3d3810fb
added workaround
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-08-03 14:43:09 +02:00
Anton-4
fd8b7355f6
Num.neg docs
See also https://github.com/roc-lang/roc/issues/6959

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-08-03 14:37:00 +02:00