Add generic Node type
This commit is contained in:
parent
6be208b51d
commit
26a8ff307f
@ -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>);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user