Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Cypher1 committed Apr 14, 2024
1 parent 15bdfe8 commit e26206e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions takolib/src/lowerer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pub fn lower(_path: &Path, og_ast: &Ast, root: NodeId) -> Result<Llamada, TError
let location = ast.get(*nodeid).location;
let str = ast.string_interner.get_str_by_loc(location.start);
trace!("GOT NUMERIC AT {:?} => {:?}", &location, str);
let str = str.expect("Got nothing for the string");
let val = str
.expect("Got nothing for the string")
.parse::<u32>()
.expect("Could not parse string as number");
val.into()
Expand All @@ -56,10 +56,12 @@ pub fn lower(_path: &Path, og_ast: &Ast, root: NodeId) -> Result<Llamada, TError
todo!("WHAT?")
};
eprintln!("ABS OVER {}", ast.pretty_node(inner));
let curr = get_expr(&mut expr, inner, Some(Term::Var(1))); // TODO: Reassociate...
let curr = get_expr(&mut expr, *nodeid, Some(Term::Abs(None, curr))); // TODO: Add the type info?
// TODO: Reassociate...
let var = get_expr(&mut expr, inner, Some(Term::Var(1)));
// TODO: Add the type info?
let abs = get_expr(&mut expr, *nodeid, Some(Term::Abs(None, var)));
let node: &mut Node = ast.get_mut(*nodeid);
node.lowered_to = Some(curr);
node.lowered_to = Some(abs);
continue;
}
// TODO!?
Expand Down

0 comments on commit e26206e

Please sign in to comment.