Joshua Warner
6d22c4dd7c
Several migration fixes and make some zig parser improvements based on migrated code in the wild ( #7716 )
2025-04-08 13:46:44 +02:00
Joshua Warner
109cb93b20
Implement a migration to new braces syntax and add migrate tests
2025-02-16 20:37:28 -08:00
Joshua Warner
ce8f7065db
Implement initial roc tokenizer in zig
2025-02-04 21:40:51 -08:00
Anthony Bullard
eb9d1bcf09
Format apply funcs with try suffix correctly
2025-01-28 21:00:30 -06:00
Sam Mohr
631e59ce06
Upgrade hosted header in the style module header
2025-01-26 15:07:57 -08:00
Luke Boswell
5b4c8e70d8
Merge pull request #7536 from joshuawarner32/remove-indented-else
...
Remove indented-else syntax from the formatter
2025-01-21 18:02:05 +11:00
Joshua Warner
20d092ea48
Remove indented-else syntax from the formatter
...
This is step 1 in removing the syntax all together. The formatter will now seemlessly migrate everyone to the usual if/then/else syntax. After everyone has had a chance to upgrade, we can then remove this from the parser (in a future PR).
2025-01-20 19:18:37 -08:00
Joshua Warner
3c158f643d
Fix and/or parsing
2025-01-20 17:00:20 -08:00
Joshua Warner
ef4df617ce
Fix type header / pattern equivalence
2025-01-20 17:00:20 -08:00
Sam Mohr
809fe23afd
Merge pull request #7533 from smores56/simple-can-solo
...
Move desugaring to new `roc_can_solo` crate
2025-01-19 19:06:10 -08:00
Luke Boswell
5981e4354c
Merge pull request #7510 from joshuawarner32/pnc-fuzzing-fixes-4
...
Fix yet more fuzzing bugs
2025-01-20 09:26:52 +11:00
Sam Mohr
fce14d31b0
Move desugaring to new roc_can_solo crate
2025-01-19 07:16:43 -08:00
Joshua Warner
300412a4da
Fix pipe closure after expr
2025-01-18 19:40:52 -08:00
Sam Mohr
7914f0c7d8
Fix clippy issue
2025-01-17 20:01:54 -08:00
Sam Mohr
b8de09d048
Update tests
2025-01-17 19:10:20 -08:00
Sam Mohr
1a9668e83a
Add tests for desugaring and formatting
2025-01-17 18:55:58 -08:00
Anton-4
3cc3118ffb
update snapshot
2025-01-17 17:46:46 +01:00
Joshua Warner
d42af0b763
Expand handling of guard_needs_parens
2025-01-16 21:32:37 -08:00
Joshua Warner
7f1b3449a6
Correct handling of binop with SpaceAfter in a Body def
2025-01-16 21:32:06 -08:00
Joshua Warner
51f2cdccf7
Relax argument indentation requirements in closures
2025-01-16 21:27:40 -08:00
Joshua Warner
ede015517a
Unify Alias and Annotation formatting
2025-01-16 21:21:02 -08:00
Joshua Warner
6127bd2d26
Move unit assignment handling to lifting phase
2025-01-16 21:19:21 -08:00
Joshua Warner
ff230c4261
Make nodes more strongly normalizing to fix confusion with outdentability
2025-01-16 21:18:21 -08:00
Joshua Warner
a945fd9c5c
Force indent on where clause
2025-01-16 21:17:56 -08:00
Joshua Warner
f08a0012ea
Fix negative float and non-base-10 literal patterns
2025-01-16 21:16:53 -08:00
Joshua Warner
962534e3d1
Fix a couple issues with multiline string literal formatting
2025-01-16 21:16:34 -08:00
Joshua Warner
316ec39af7
Also handle tuple accessors for multiline string checking
2025-01-16 21:16:10 -08:00
Anthony Bullard
d3c400b5e0
Merge pull request #7520 from gamebox/format-new-lambdas
...
Format all lambdas to new syntax
2025-01-16 16:55:10 -06:00
Anthony Bullard
1b43ffa579
Format all lambdas to new syntax
2025-01-16 08:03:44 -06:00
Sam Mohr
b73e4387ae
Implement ? binop operator
2025-01-16 02:44:32 -08:00
Anthony Bullard
8e1e1520e3
New Lambda Syntax with |...|
...
This adds parser support for the new lambda syntax. It does not remove
the existing syntax, nor will the new syntax be retained in formatting.
That will be done in a separate PR to keep the two respective PRs
relatively small and easy to review.
2025-01-15 05:58:16 -06:00
Anthony Bullard
4e66910ef8
Add a few tests
2025-01-15 05:56:39 -06:00
Joshua Warner
d43ad92789
Introduce proper type for TypeVar's, mark anything not a lowercase ident as malformed
2025-01-14 19:30:33 -08:00
Joshua Warner
5ebd6e0884
Only conditionally fuzz canonicalize
2025-01-11 20:24:35 -08:00
Joshua Warner
853dd5725b
Also handle large tuple indices in a.123 form
2025-01-11 20:24:35 -08:00
Joshua Warner
61bc0b3464
Resolve TODO around handling non-plain strings
2025-01-11 20:24:34 -08:00
Joshua Warner
e0ef01fa82
Fix two canonicalization crashes: try() and overflowed tuple indexes
2025-01-11 20:24:34 -08:00
Joshua Warner
7d464a2989
add failing test for ignored fields canonicalization
2025-01-11 20:24:33 -08:00
Joshua Warner
408379f8d3
Canonicalize the pattern in annotations
2025-01-11 20:24:30 -08:00
Joshua Warner
875e355b68
handle record access when checking for block string literals
2025-01-11 11:05:54 -08:00
Joshua Warner
6d2b635dbc
Don't turn pnc apply dbg into DbgStmt
2025-01-11 11:05:35 -08:00
Joshua Warner
6d324590da
Fix pipe indents in when
2025-01-11 11:05:35 -08:00
Joshua Warner
1cc97fcfa7
Fix else spacing
2025-01-11 11:05:34 -08:00
Joshua Warner
6b08f42d02
Fix more cases of when in guard
2025-01-11 11:05:34 -08:00
Joshua Warner
903b792fd3
Fix when in when guard
2025-01-11 11:05:33 -08:00
Joshua Warner
586dc3486f
Fix formatting of negative numbers in pnc apply patterns
2025-01-11 11:05:33 -08:00
Joshua Warner
2e4e4bb957
Fix placement of comma after implements in pnc apply patterns
2025-01-11 11:05:33 -08:00
Joshua Warner
0471993428
Further relax indentation of implements ability chains
2025-01-10 21:10:58 -08:00
Joshua Warner
7a1b3b8257
Allow funky indentation of implements clause, since we know it must be coming anyway
2025-01-10 21:10:57 -08:00
Joshua Warner
2bd03ef16b
Fix pnc apply in unary negate
2025-01-10 21:10:56 -08:00