schala/schala-lang/language/src/scope_resolution.rs

21 lines
522 B
Rust
Raw Normal View History

2019-09-03 01:42:28 -07:00
use crate::ast::*;
pub fn resolve_scopes(ast: &mut AST) -> Result<(), String> {
println!("Resolving scopes - nothing so far!");
2019-09-03 02:19:37 -07:00
for statement in ast.0.iter_mut() {
match statement.mut_node() {
Statement::Declaration(ref mut decl) => resolve_decl(decl),
Statement::ExpressionStatement(ref mut expr) => resolve_expr(expr),
}?;
}
Ok(())
}
fn resolve_decl(decl: &mut Declaration) -> Result<(), String> {
Ok(())
}
fn resolve_expr(expr: &mut Meta<Expression>) -> Result<(), String> {
2019-09-03 01:42:28 -07:00
Ok(())
}