Agus Zubiaga
d692fc7c42
Format effectful arrows in annotations
2024-11-07 18:54:11 -03:00
Agus Zubiaga
ef4eeb5c1a
Parse effectful arrow in function annotations
2024-11-07 18:54:11 -03:00
Sam Mohr
308defac46
Implement the try
keyword with desugaring
2024-11-01 17:34:11 -07:00
Sam Mohr
6a2ffb2f5a
Implement most of the recent round of PR feedback
2024-10-26 04:17:50 -07:00
Sam Mohr
ca762127e5
Fix formatting and clippy errors
2024-10-24 23:11:20 -07:00
Sam Mohr
7518a2c5ab
Address PR comments, add syntax tests
2024-10-21 03:06:43 -07:00
Sam Mohr
b3e60f9d3a
Implement return keyword
2024-10-20 08:58:59 -07:00
Luke Boswell
0271f2eeb2
Merge pull request #7151 from hrishisd/deprecate-old-str-interpolation
...
Remove deprecated string interpolation syntax #7148
2024-10-09 11:21:18 +11:00
hrishisd
cb98c45e88
Remove deprecated string interpolation syntax
2024-10-08 16:31:22 -04:00
Brendan Hansknecht
21e370f41f
minor formatting fixes
2024-10-07 21:16:30 -07:00
Brendan Hansknecht
bdb6651c13
Enable parsing multiple signitures for requires header
2024-10-07 21:16:30 -07:00
Sam Mohr
2da08be8ef
Remove old record builder syntax
2024-09-21 04:44:44 -07:00
snobee
819db7fb44
fix formatting for indented else
2024-09-06 14:37:04 -07:00
snobee
a7afac7ac7
Add boolean flag to Expr::If for indented else statement
2024-09-05 16:28:44 -07:00
Agus Zubiaga
2469a3aa2d
Merge pull request #7050 from roc-lang/arg-patterns-as
2024-09-02 14:02:17 -03:00
Agus Zubiaga
4e19753189
fmt: Use format_with_options Parens for as pattern arguments
2024-09-02 12:02:01 -03:00
Agus Zubiaga
2486ce0e48
fmt: Add parens around as
patterns in arguments
2024-09-02 11:54:34 -03:00
Anton-4
02cf61f985
Merge pull request #7038 from mulias/expr-dbg
...
Support `dbg` in expressions
2024-09-02 13:30:32 +02:00
Elias Mulhall
56c5b790a7
Refactor dbg expression parsing to work more like function application
...
Instead of parsing dbg with an expression block, parse the dbg keyword
with no additional arguments. This way the parser treats dbg just like a
variable in function application. We desugar by pattern matching on
`Apply(Dbg, args, called_via)` nodes. This changes the output of syntax
tests since the initial AST is different, but does not change the output
of can or mono.
Add two new errors for dbg in expression position with either no args or
too many args. This is similar to the error behavior of `crash`.
Continue to parse dbg statements with an expression block, as before.
2024-08-29 15:36:48 -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
Sam Mohr
12df3a04de
Merge attempt
2024-08-19 23:34:05 -07:00
Joshua Warner
6b6968632f
Merge branch 'main' into format-invisible-chars
2024-08-17 10:22:40 -07:00
Aidan
1551d8fb0d
preserve multiline string trailing whitespace
2024-08-17 09:57:59 -04:00
Aidan
7be537dd55
format invisible characters in strings to unicode escapes
2024-08-17 01:16:58 -04:00
Sam Mohr
b1a972ab21
Implement &foo
record updater syntax sugar
2024-08-16 01:41: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
Sam Mohr
7e72541a79
Merge branch 'main' into builtin-task
2024-08-12 23:12:38 -07:00
Agus Zubiaga
b451e69b20
Merge branch 'main' into typecheck-module-params
2024-08-12 22:27:16 -03: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
cb8040f629
Ignore underscore-prefixed fields in record builders
2024-08-06 22:49:35 -07:00
Sam Mohr
8288af3156
Merge branch 'main' into builtin-task
2024-07-31 13:36:32 -07:00
Aidan
ddb58a2cd5
spaces_middle
-> lines_between
2024-07-29 13:06:48 -04:00
Aidan
2529fa0721
get rid of extra newlines
2024-07-29 11:10:16 -04:00
Aidan
91fdd903e7
comment
-> spaces_middle
2024-07-29 10:04:32 -04:00
Aidan
125990855f
Merge branch 'main' into store-all-space-between-annotation-body
2024-07-29 09:46:05 -04:00
Luke Boswell
eca453d07f
Merge remote-tracking branch 'remote/main' into builtin-task
2024-07-29 16:05:51 +10:00
Aidan
7fe052322c
update test, fix logic
2024-07-27 16:55:13 -04:00
Joshua Warner
4f32f43048
Implement block / indent based parsing
...
... and enforce that defs can only occur in blocks (or, inside parenthesized expressions)
2024-07-27 13:34:16 -07:00
Aidan
3c78b4fb86
functional changes
2024-07-27 12:16:04 -04:00
Luke Boswell
b489c44b19
Merge remote-tracking branch 'remote/main' into builtin-task
2024-07-19 19:51:50 +10:00
Sam Mohr
fe1b6d71fc
Update from PR comments
2024-07-07 18:33:20 -07:00
Sam Mohr
f415017c90
Implement new builder syntax alongside old one
2024-07-07 03:28:59 -07:00
Sam Mohr
f61b303a59
Merge branch 'main' into builtin-task
2024-07-03 00:42:48 -07:00
Agus Zubiaga
90c7745989
Capture import params location for better errors
2024-07-02 11:09:56 -03:00
Agus Zubiaga
7ac72159e9
Parse module params loc and rename to pattern
2024-07-02 04:10:45 -03:00
Kiryl Dziamura
de9ed734c5
remove EmptyDefsFinal
2024-07-01 18:45:23 +02:00
Sam Mohr
700c7ae9aa
Add Task as a built-in module/type
2024-06-25 00:03:56 -07:00
Evan Relf
d678f1c049
Format shebangs correctly
...
Fixes the regression I described in [#1135 ].
[#1135 ]: https://github.com/roc-lang/roc/issues/1135
2024-06-19 15:07:22 -07:00