Skip to content

Commit

Permalink
Add lower constant layout
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed May 8, 2024
1 parent 0340db8 commit f9a9dbc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion crates/concrete_ir/src/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::collections::HashMap;
use common::{BuildCtx, FnBodyBuilder, IdGenerator};
use concrete_ast::{
common::Span,
constants::ConstantDef,
expressions::{
ArithOp, BinaryOp, BitwiseOp, CmpOp, Expression, FnCallOp, IfExpr, LogicOp, PathOp,
PathSegment, ValueExpr,
Expand Down Expand Up @@ -75,7 +76,9 @@ fn lower_module(mut ctx: BuildCtx, module: &Module, id: DefId) -> Result<BuildCt
// lower first structs, constants, types
for content in &module.contents {
match content {
ModuleDefItem::Constant(_) => todo!(),
ModuleDefItem::Constant(info) => {
ctx = lower_constant(ctx, info, id)?;
}
ModuleDefItem::Struct(info) => {
ctx = lower_struct(ctx, info, id)?;
}
Expand Down Expand Up @@ -179,6 +182,14 @@ fn lower_module(mut ctx: BuildCtx, module: &Module, id: DefId) -> Result<BuildCt
Ok(ctx)
}

fn lower_constant(
mut ctx: BuildCtx,
info: &ConstantDef,
id: DefId,
) -> Result<BuildCtx, LoweringError> {
todo!()
}

fn lower_struct(
mut ctx: BuildCtx,
info: &StructDecl,
Expand Down

0 comments on commit f9a9dbc

Please sign in to comment.