pub fn parse_with_warnings(
source: &str,
) -> Result<(Vec<Stmt>, Vec<BopWarning>), BopError>Expand description
Parse Bop source and run the static check pass, returning
both the AST and any non-fatal warnings (currently:
match-exhaustiveness). Prefer this over parse in tools
that surface diagnostics to users — the CLI uses it to
print warnings before running the program.
Imported enums are opaque at this layer — see
parse_with_warnings_and_resolver for a variant that
walks use statements to pick up imported enum decls so
exhaustiveness warnings fire on them too.