Fix warnings.

This commit is contained in:
losfair
2019-03-17 10:54:50 +08:00
parent f8fe999015
commit d8d39c309c
6 changed files with 143 additions and 207 deletions

View File

@ -144,15 +144,6 @@ impl ValueStack {
}
}
pub fn peek(&self) -> Result<ValueInfo, CodegenError> {
match self.values.last().cloned() {
Some(x) => Ok(x),
None => Err(CodegenError {
message: "no value on top of stack",
}),
}
}
pub fn reset_depth(&mut self, target_depth: usize) {
self.values.truncate(target_depth);
}