Closed jasikpark closed 1 week ago
Seems like there needs to be an error thrown when there's a let
but no associated declaration?
Hmm yes. Could start with let mut declarations = vec![VariableDeclarationItem::from_reader(...)]
but yes emitting a ParseError
if declarations.is_empty
would be better because it could be allowed under partial_syntax
so that this works
Will investigate and fix! (also same issue for const
below and will check for var
)
I'm thinking I may do work to integrate these mature fuzzers with OSS-Fuzz, where they can be run for longer and catch bugs like these, since it seems like they aren't catching anything on 5m Github Action runs anymore, right?
(https://google.github.io/oss-fuzz/getting-started/continuous-integration/)
There are things being caught! I am unsure how this example hadn't been flagged by CI yet? Maybe just a rare state.
ATM things in the type checker have a lot higher priority so I am quite happy with the current level of parsing fuzzing. If you want to and is simple to change/upgrade sure! I do want to keep it under 2 mins though, it is a bit annoying to wait any longer for results.
as input for the
module_roundtrip_naive
fuzzer produces this error:https://github.com/kaleidawave/ezno/blob/34eecf1198229424560bf390fd87b0ec82d407db/parser/src/declarations/variable.rs#L273-L276