Remove Meta type

This commit is contained in:
greg 2019-09-20 12:03:42 -07:00
parent fd3922d866
commit 03f8abac6a
1 changed files with 0 additions and 36 deletions

View File

@ -1,8 +1,6 @@
use std::rc::Rc;
use std::convert::From;
use crate::derivative::Derivative;
use crate::symbol_table::FullyQualifiedSymbolName;
mod operators;
pub use operators::*;
@ -41,40 +39,6 @@ impl ItemIdStore {
}
}
#[derive(Clone, Debug, PartialEq)]
pub struct Meta<T> {
pub n: T,
pub fqsn: Option<FullyQualifiedSymbolName>
}
impl<T> Meta<T> {
pub fn new(n: T) -> Meta<T> {
Meta { n,
fqsn: None,
}
}
pub fn node(&self) -> &T {
&self.n
}
pub fn mut_node(&mut self) -> &mut T {
&mut self.n
}
}
//TODO this PartialEq is here to make tests work - find a way to make it not necessary
#[derive(Clone, Debug, Default, PartialEq)]
struct SourceMap {
}
impl From<Expression> for Meta<Expression> {
fn from(expr: Expression) -> Meta<Expression> {
Meta::new(expr)
}
}
#[derive(Derivative, Debug)]
#[derivative(PartialEq)]
pub struct AST {