use std;
use obstack::{Obstack};
struct ASTContext {
statement_stack: Obstack,
expr_stack: Obstack,
name_stack: Obstack,
local_stack: Obstack,
}
struct Scope<'parent, 'ctx: 'parent> {
parent: &'parent Scope<'parent, 'ctx>,
locals: std::collections::HashMap<&'ctx str, ()>,
}
struct Block<'ctx> {
statements: Vec<&'ctx dyn StatementContainer<'ctx>>,
}
struct Node<T: Sized> {
data: T,
children: usize,
}
trait StatementContainer<'ctx> {}
struct StatementNode<'ctx, T: Sized> {
statement: T,
previous: Option<&'ctx dyn StatementContainer<'ctx>>,
next: Option<&'ctx dyn StatementContainer<'ctx>>,
}
impl<'ctx, T: Sized> StatementContainer<'ctx> for StatementNode<'ctx, T> {
}
pub struct StatLocalDecl { }
pub enum Statement<'ctx> {
LocalDecl { },
Do { block: Block<'ctx> }
}