diff --git a/crates/lang/src/parser.rs b/crates/lang/src/parser.rs index 8843d11..8422bc0 100644 --- a/crates/lang/src/parser.rs +++ b/crates/lang/src/parser.rs @@ -100,14 +100,3 @@ pub(crate) fn parser< decls: IndexMap::from_iter(decls), })) } -pub mod asg { - use std::collections::BTreeMap; - - use petgraph::{adj::NodeIndex, data::Build, graph::DiGraph}; - - use super::{ast::Expr, Spanned}; - - pub struct Asg<'src> { - ast: Expr<'src>, - } -} diff --git a/crates/lang/src/parser/ast.rs b/crates/lang/src/parser/ast.rs index e58c5aa..02ce0ae 100644 --- a/crates/lang/src/parser/ast.rs +++ b/crates/lang/src/parser/ast.rs @@ -28,18 +28,18 @@ pub enum Expr<'src> { Option, Expression<'src>>>>, ), SimplePipe(Box>, Box>), - NamingPipe( - Box>, - (Vec>, Vec>), - Box>, - ), + // NamingPipe( + // Box>, + // (Vec>, Vec>), + // Box>, + // ), MappingPipe(Box>, Box>), NullPipe(Box>, Box>), MultiPipe(IndexMap, Expression<'src>>), - LetIn( - IndexMap, Box>>, - Box>, - ), + // LetIn( + // IndexMap, Box>>, + // Box>, + // ), // $ Var(&'src str), // @ diff --git a/crates/lang/src/tokens.rs b/crates/lang/src/tokens.rs index 40280e7..e881663 100644 --- a/crates/lang/src/tokens.rs +++ b/crates/lang/src/tokens.rs @@ -10,6 +10,10 @@ pub enum Token<'a> { // so a declaration needs the keyword def until i can figure this out #[token("def")] Def, + #[token("let")] + Let, + #[token("in")] + In, #[regex("[a-zA-Z0-9_\\-]+", |lex| lex.slice())] Word(&'a str), #[regex("\\$[a-zA-Z0-9_\\-]+", |lex| &lex.slice()[1..])]