Fix warnings
This commit is contained in:
parent
0f424c70d7
commit
04e0c136df
@ -3,8 +3,6 @@
|
||||
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
use llvm_sys::core::{LLVMBuildAlloca, LLVMBuildLoad2, LLVMBuildStore};
|
||||
|
||||
use crate::{
|
||||
BlockData, ConstValue, FunctionData, Instr, InstructionData, ModuleData, TerminatorKind, Type,
|
||||
util::match_types,
|
||||
|
@ -1,6 +1,5 @@
|
||||
use std::{collections::HashMap, mem};
|
||||
|
||||
use llvm_sys::core::LLVMBuildStore;
|
||||
use reid_lib::{
|
||||
builder::InstructionValue, Block, CmpPredicate, ConstValue, Context, Function, Instr, Module,
|
||||
TerminatorKind as Term, Type,
|
||||
|
@ -268,10 +268,12 @@ impl Block {
|
||||
impl Statement {
|
||||
fn pass<T: Pass>(&mut self, pass: &mut T, state: &mut State<T::TError>, scope: &mut Scope) {
|
||||
match &mut self.0 {
|
||||
StmtKind::Let(_, mutable, expression) => {
|
||||
StmtKind::Let(_, _, expression) => {
|
||||
expression.pass(pass, state, scope);
|
||||
}
|
||||
StmtKind::Set(_, expression) => {
|
||||
expression.pass(pass, state, scope);
|
||||
}
|
||||
StmtKind::Set(variable_reference, expression) => {} // TODO
|
||||
StmtKind::Import(_) => todo!(),
|
||||
StmtKind::Expression(expression) => {
|
||||
expression.pass(pass, state, scope);
|
||||
@ -281,7 +283,8 @@ impl Statement {
|
||||
pass.stmt(self, PassState::from(state, scope));
|
||||
|
||||
match &mut self.0 {
|
||||
StmtKind::Let(variable_reference, mutable, _) => scope
|
||||
StmtKind::Let(variable_reference, mutable, _) => {
|
||||
scope
|
||||
.variables
|
||||
.set(
|
||||
variable_reference.1.clone(),
|
||||
@ -290,10 +293,11 @@ impl Statement {
|
||||
mutable: *mutable,
|
||||
},
|
||||
)
|
||||
.ok(),
|
||||
StmtKind::Set(variable_reference, expression) => None, // TODO
|
||||
.ok();
|
||||
}
|
||||
StmtKind::Set(_, _) => {}
|
||||
StmtKind::Import(_) => todo!(),
|
||||
StmtKind::Expression(_) => None,
|
||||
StmtKind::Expression(_) => {}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,6 @@ impl Block {
|
||||
|
||||
for statement in &mut self.statements {
|
||||
let ret = match &mut statement.0 {
|
||||
// TODO
|
||||
StmtKind::Let(variable_reference, mutable, expression) => {
|
||||
let res = expression.typecheck(&mut state, Some(variable_reference.0));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user