From 26a8ff307fb6f4e8463597947bab82954bd59f8c Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 20 Nov 2018 03:21:10 -0800 Subject: [PATCH] Add generic Node type --- schala-lang/language/src/ast.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/schala-lang/language/src/ast.rs b/schala-lang/language/src/ast.rs index 8438282..eae5a98 100644 --- a/schala-lang/language/src/ast.rs +++ b/schala-lang/language/src/ast.rs @@ -4,6 +4,20 @@ use std::convert::From; use source_map::{SourceMap}; use builtin::{BinOp, PrefixOp}; +pub struct Node { + n: T, + meta: Meta +} + +impl Node { + fn node(&self) -> &T { + &self.n + } +} + +struct Meta { +} + #[derive(Debug, PartialEq)] pub struct AST(pub Vec);