Joshua Warner
9ff1b630a8
Fix accidental NoProgress return in if, to avoid exponential parsing issue
2025-01-01 12:40:54 -05:00
Joshua Warner
37e7caa1aa
Parenthesize closures in unary ops and pre-emptively disallow multi-backpassing in such closures, to avoid formatter trouble later
2025-01-01 12:38:28 -05:00
Joshua Warner
d9ad34592c
Fix indentation of single-line ifs
2025-01-01 10:47:16 -05:00
Joshua Warner
4da6bb0be6
Fix weird indentation issue with indented else
2025-01-01 10:03:05 -05:00
Joshua Warner
0acd59b4d6
Treat crash keyword uniformly
2024-12-28 22:29:42 -05:00
Anthony Bullard
c70ceb4f98
Issue 7089: ?? operator
2024-12-26 10:53:47 -06:00
Joshua Warner
96c5dcb651
Relax indentation parsing inside parens, lists, and records
2024-12-15 18:33:54 -08:00
Joshua Warner
6ef87b3b9d
Graccefully handle overflowing unicode literals
2024-12-15 18:33:54 -08:00
Joshua Warner
307b0d9ea9
Fix closure indentation and indented-else handling in niche pattern case
2024-12-15 18:33:52 -08:00
Joshua Warner
a15998872d
Also conservatively check for spaces at the beginning of the pattern
2024-12-15 18:33:50 -08:00
Joshua Warner
f193c778d5
clippy
2024-12-13 13:45:11 -08:00
Joshua Warner
d3426ebce1
Fix empty SpaceBefore instance
2024-12-13 13:45:11 -08:00
Joshua Warner
16c3d4e512
Don't drop spaces before return
2024-12-13 13:45:10 -08:00
Joshua Warner
07f7252573
Implement better comparisons between alias and body
2024-12-13 13:45:09 -08:00
Joshua Warner
0cc16b0d2c
Fix bug with when not passing down options
2024-12-13 13:45:09 -08:00
Joshua Warner
8642f8500e
Switch to conservatively checking if the annotation/alias ends in a space before merging
2024-12-05 18:54:24 -08:00
Joshua Warner
e22e37a9c1
Remove accideental dbg!()
2024-12-05 18:54:23 -08:00
Joshua Warner
9a9b96dc69
Fix clippy
2024-12-05 18:54:22 -08:00
Joshua Warner
78cda703d9
Fixup negative allowance in calls
2024-12-05 18:54:20 -08:00
Joshua Warner
5c387857ff
Indented seq parsing for imports
2024-12-05 18:54:18 -08:00
Joshua Warner
19f8cc532a
Disallow conditionals after neg/not
2024-12-05 18:54:17 -08:00
Joshua Warner
7eb9909ac5
Make parsing of conditionals consistent between stmts/exprs
2024-12-05 18:54:16 -08:00
Joshua Warner
cabe67f88d
Only allow indented else if there's a newline after the else
2024-12-05 18:54:14 -08:00
Joshua Warner
b9862b47dc
Several fixes found in fuzzing
2024-12-05 18:54:03 -08:00
Sam Mohr
de626102c8
Use new try impl for ? operator
2024-12-05 02:13:13 -08:00
Sam Mohr
eedade8e81
Initial working version of proper try
keyword
2024-12-04 02:31:59 -08:00
Joshua Warner
f7a5f06e5b
Fix a bunch of bugs found in fuzzing
2024-12-01 12:40:19 -08:00
Joshua Warner
5cd38c969f
Fix a couple minor parsing bugs
2024-12-01 12:40:17 -08:00
Joshua Warner
d4301e86a3
Improve parsing of negative + not'd exprs
2024-12-01 12:40:16 -08:00
Joshua Warner
912db1b76b
Fix round-trip parse->fmt->parse for dbg stmts with more than one arg
2024-12-01 12:40:13 -08:00
Anton-4
74d137cad4
Revert "Merge pull request #7267 from joshuawarner32/fuzzing-bugs-2"
...
This reverts commit 364249a29d
, reversing
changes made to 0e550a7f68
.
2024-11-30 18:43:16 +01:00
Joshua Warner
ed62bcc15a
Fix a bunch of parser/formatter bugs found in fuzzing
...
Notably:
* Unified how parens are formatted between (1) when we have a ParensAround, and (2) when we've decided an Apply needs to have parens
* Made unary minus require the be indented to the same level as any other expression continuation. (it used to accidentally have rules meant for binary operators applied)
* Don't apply extra indent to the backpassing continuation in the case that the call does itself require indentation
* Make `try@foo` correctly parse as `try @foo`, so that formatting doesn't change the tree when it adds that space
* Detect more cases where we need to outdent trailing e.g. {} blocks in applies
* Approximately a bagillion other things, 90% of which I added tests for, and none of which affected the formatting of examples or builtins
2024-11-29 16:25:59 -08:00
JRI98
771a34054c
Remove an unused enum and a struct
2024-11-28 20:17:17 +00:00
Agus Zubiaga
1dc9dd0a90
Merge branch 'main' into specialize-exprs
2024-11-27 11:35:14 -03:00
Joshua Warner
b4fdb0a4c2
Make dbg parse strictly as an Apply
...
This is important in order to fix some formatting bugs found in fuzzing
2024-11-24 14:15:29 -08:00
Agus Zubiaga
2e96aca0fd
Merge branch 'main' into specialize-exprs
2024-11-23 01:48:51 -03:00
JRI98
de4179d5e1
Remove unused ast::Expr::Expect
2024-11-18 14:13:46 +00:00
Joshua Warner
9ead801536
Remove expect-fx syntax and handling
...
This was never fully hooked up in platforms, and the plan is to replace the need for this with doing purity-inference on normal `expect` statements.
On the other hand, fuzzing is finding some bugs caused by having a hyphenated keyword, so this is a great time to go ahead and remove it!
2024-11-17 20:25:37 -08:00
Anton-4
19a716b8e9
Merge pull request #7225 from joshuawarner32/fuzzing-bugs
...
Fix some bugs found via fuzzing
2024-11-16 19:46:12 +01:00
Joshua Warner
550113df67
Fix some bugs found via fuzzing
...
* Keywords need to still be recognized if they're followed by ',' as well as a bunch of other operator characters. Notably missing from this list is '-', since that would mess up expect-fx currently.
* Smattering of niche cases of formatting bugs (either non-idempotency, leading to different code, or leading to unparsable code)
* One missing indent call in fmt_collection leading to a panic
2024-11-15 21:33:44 -08:00
JRI98
a332acd7bf
Remove unused malformed related variants
2024-11-14 10:23:06 +00:00
Agus Zubiaga
8bde68cc5e
Restore parsing !
suffix
...
This reverts commit 52896d9fa65141df832989b326f526cbedf67341.
We actually still need this for when `!` follows a non-ident expr
2024-11-07 18:54:15 -03:00
Agus Zubiaga
56cdc749af
Do not attempt to parse !
suffix
2024-11-07 18:54:14 -03:00
Agus Zubiaga
2cce5ad023
Allow unsuffixed statements in parser
...
Moves the "STATEMENT AFTER EXPRESSION" error from the parser to canonicalization.
We'll later use this to allow this case in effectful functions.
2024-11-07 18:54:14 -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
294f0c0d1f
Merge branch 'main' into return-keyword
2024-10-24 23:01:10 -07:00
Richard Feldman
e589923ae8
Make collections::soa use the soa
crate
2024-10-21 22:10:43 -04:00
Richard Feldman
b2ea0b842c
Revert "Do some checked SoA stuff"
...
This reverts commit c79d7745f6eb345fd50a7cb4a2a7dd6fb6f8f1fc.
2024-10-21 22:10:43 -04:00
Richard Feldman
a8d3280b02
Do some checked SoA stuff
2024-10-21 22:10:42 -04:00