mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-17 18:40:17 +00:00
Merge pull request #4758 from joshuawarner32/fuzzing-take-2
Add fuzzing for the formatter and fix bugs
This commit is contained in:
commit
dbdf4acdd7
58 changed files with 1286 additions and 471 deletions
|
@ -620,6 +620,7 @@ pub enum PInParens<'a> {
|
|||
pub enum EType<'a> {
|
||||
Space(BadInputError, Position),
|
||||
|
||||
UnderscoreSpacing(Position),
|
||||
TRecord(ETypeRecord<'a>, Position),
|
||||
TTagUnion(ETypeTagUnion<'a>, Position),
|
||||
TInParens(ETypeInParens<'a>, Position),
|
||||
|
@ -1203,18 +1204,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub fn fail_when_progress<T, E>(
|
||||
progress: Progress,
|
||||
fail: E,
|
||||
value: T,
|
||||
state: State<'_>,
|
||||
) -> ParseResult<'_, T, E> {
|
||||
match progress {
|
||||
MadeProgress => Err((MadeProgress, fail)),
|
||||
NoProgress => Ok((NoProgress, value, state)),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn optional<'a, P, T, E>(parser: P) -> impl Parser<'a, Option<T>, E>
|
||||
where
|
||||
P: Parser<'a, T, E>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue