Further attempts at refactoring the error handling code
* Everything's still broken though
This commit is contained in:
parent
0443754007
commit
7961a92ad1
6 changed files with 99 additions and 59 deletions
src
|
@ -8,7 +8,7 @@ use crate::{
|
|||
|
||||
pub type ResolvedVariables = HashMap<*const ast::ExprNode, usize>;
|
||||
|
||||
pub fn resolve_variables(program: &ast::ProgramNode) -> Result<ResolvedVariables, SloxError> {
|
||||
pub fn resolve_variables(program: &ast::ProgramNode) -> SloxResult<ResolvedVariables> {
|
||||
let mut state = ResolverState::default();
|
||||
program.resolve(&mut state).map(|_| state.resolved)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue