ItemId type

This commit is contained in:
greg 2019-09-18 01:51:23 -07:00
parent 3eaeeb5509
commit 8b6de6961f
1 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,18 @@ use crate::symbol_table::FullyQualifiedSymbolName;
mod operators;
pub use operators::*;
/// An abstract identifier for an AST node
#[derive(Debug, PartialEq, Clone)]
pub struct ItemId {
idx: u32,
}
impl ItemId {
pub fn new(n: u32) -> ItemId {
ItemId { idx: n }
}
}
#[derive(Clone, Debug, PartialEq)]
pub struct Meta<T> {
pub n: T,