Fail fuzzing on internal errors (#366)

This commit is contained in:
Casey Rodarmor 2018-10-13 21:38:44 +08:00 committed by GitHub
parent 6b0fc174d8
commit 6430d38a6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,9 @@
use common::*; use common::*;
pub fn compile(text: &str) { pub fn compile(text: &str) {
Parser::parse(text).ok(); if let Err(error) = Parser::parse(text) {
if let CompilationErrorKind::Internal{..} = error.kind {
panic!("{}", error)
}
}
} }