diff --git a/src/protocol/ast.rs b/src/protocol/ast.rs index d13858742e9dfebef5e58077d83232985bbdd954..c9a3b7df8f7d7f790269307323008e0849b06bf0 100644 --- a/src/protocol/ast.rs +++ b/src/protocol/ast.rs @@ -1,6 +1,3 @@ -// TODO: @cleanup, rigorous cleanup of dead code and silly object-oriented -// trait impls where I deem them unfit. - use std::fmt; use std::fmt::{Debug, Display, Formatter}; use std::ops::{Index, IndexMut}; @@ -404,7 +401,6 @@ impl ParserTypeVariant { /// the compiler. #[derive(Debug, Clone)] pub struct ParserTypeElement { - // TODO: @Fix span pub element_span: InputSpan, // span of this element, not including the child types pub variant: ParserTypeVariant, } @@ -1433,7 +1429,6 @@ impl Expression { } } - // TODO: @cleanup pub fn parent(&self) -> &ExpressionParent { match self { Expression::Assignment(expr) => &expr.parent, @@ -1450,7 +1445,7 @@ impl Expression { Expression::Variable(expr) => &expr.parent, } } - // TODO: @cleanup + pub fn parent_expr_id(&self) -> Option { if let ExpressionParent::Expression(id, _) = self.parent() { Some(*id)