Add generic Node type

This commit is contained in:
greg 2018-11-20 03:21:10 -08:00
parent 6be208b51d
commit 26a8ff307f
1 changed files with 14 additions and 0 deletions

View File

@ -4,6 +4,20 @@ use std::convert::From;
use source_map::{SourceMap};
use builtin::{BinOp, PrefixOp};
pub struct Node<T> {
n: T,
meta: Meta
}
impl<T> Node<T> {
fn node(&self) -> &T {
&self.n
}
}
struct Meta {
}
#[derive(Debug, PartialEq)]
pub struct AST(pub Vec<Statement>);