Skip to content

Commit

Permalink
chore: cargo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakFarmer committed Nov 3, 2023
1 parent ae19086 commit ad44031
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 0 additions & 2 deletions codegen/src/builder.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::{cell::RefCell, collections::HashMap};

use inkwell::{
builder::Builder,
types::IntType,
values::{BasicValueEnum, PointerValue},
};
use llvm::Llvm;
Expand Down
4 changes: 2 additions & 2 deletions codegen/src/expression.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use anyhow::Error;

use inkwell::values::{BasicValueEnum, PointerValue};
use llvm::Llvm;
use parser::ast::{Expression, Literal};
use token::TokenType;

use super::builder::RecursiveBuilder;


pub enum ExpressionValue<'ev> {
LValue(PointerValue<'ev>),
Expand Down
6 changes: 3 additions & 3 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![deny(elided_lifetimes_in_paths)]

use anyhow::Error;
use inkwell::{context::Context, types::IntType, OptimizationLevel};
use llvm::Llvm;




pub mod builder;
mod expression;
Expand Down
6 changes: 3 additions & 3 deletions interpreter/src/repl.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::{Error, Result};

use inkwell::context::Context;
use parser::{ast::Node, Parser};

use parser::{Parser};
use rustyline::error::ReadlineError;

const PROMPT: &str = ">> ";
Expand All @@ -26,7 +26,7 @@ pub fn init_repl() -> Result<(), Error> {

rl.add_history_entry(line.as_str())?;

let parsed_program = Parser::new(&line).parse_program()?;
let _parsed_program = Parser::new(&line).parse_program()?;

// let value = compiler.compile(&Node::Program(parsed_program))?;

Expand Down
3 changes: 1 addition & 2 deletions llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use anyhow::Error;
use inkwell::{
builder::Builder,
context::Context,
execution_engine::{ExecutionEngine, JitFunction},
module::Module,
types::BasicTypeEnum,
values::{BasicValueEnum, GlobalValue, PointerValue},
Expand Down Expand Up @@ -92,7 +91,7 @@ impl<'ctx> Llvm<'ctx> {
&self,
name: &str,
data_type: &BasicTypeEnum<'ctx>,
value: &BasicValueEnum<'ctx>,
_value: &BasicValueEnum<'ctx>,
) -> PointerValue<'ctx> {
self.builder.build_alloca(*data_type, name)
}
Expand Down

0 comments on commit ad44031

Please sign in to comment.