mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-14 17:35:03 +01:00
fix fuzzing
it leaks????
This commit is contained in:
parent
9eff0f0188
commit
145d63e755
12 changed files with 35 additions and 284 deletions
|
|
@ -9,8 +9,8 @@ mod parse;
|
|||
mod value;
|
||||
|
||||
use crate::ast::Program;
|
||||
use bumpalo::Bump;
|
||||
|
||||
pub use bumpalo::Bump;
|
||||
pub use lex::*;
|
||||
pub use parse::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ where
|
|||
span: next.span,
|
||||
}))
|
||||
}
|
||||
TokenKind::Error(error) => Err(error),
|
||||
TokenKind::Error(error) => Err(*error),
|
||||
_ => Err(CompilerError::new(
|
||||
next.span,
|
||||
format!("invalid token in expression: `{:?}`", next.kind),
|
||||
|
|
@ -570,7 +570,7 @@ where
|
|||
span,
|
||||
})
|
||||
}
|
||||
TokenKind::Error(error) => Err(error),
|
||||
TokenKind::Error(error) => Err(*error),
|
||||
_ => {
|
||||
return Err(CompilerError::new(
|
||||
span,
|
||||
|
|
@ -665,7 +665,7 @@ where
|
|||
if token.kind == kind {
|
||||
Ok(token)
|
||||
} else if let TokenKind::Error(err) = token.kind {
|
||||
Err(err)
|
||||
Err(*err)
|
||||
} else {
|
||||
Err(CompilerError::new(
|
||||
token.span,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
#![allow(dead_code)]
|
||||
|
||||
use std::collections::LinkedList;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::ops::Deref;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue