mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00

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
14 lines
369 B
Rust
14 lines
369 B
Rust
#![no_main]
|
|
use bumpalo::Bump;
|
|
use libfuzzer_sys::fuzz_target;
|
|
use test_syntax::test_helpers::Input;
|
|
|
|
fuzz_target!(|data: &[u8]| {
|
|
if let Ok(input) = std::str::from_utf8(data) {
|
|
let input = Input::Full(input);
|
|
let arena = Bump::new();
|
|
if input.parse_in(&arena).is_ok() {
|
|
input.check_invariants(|_| (), true);
|
|
}
|
|
}
|
|
});
|