Move AstNode into the types crate.

Now that it is used for more than just iteration, it makes sense to promote it to the types crate.
This commit is contained in:
Tom Alexander
2023-10-02 13:10:45 -04:00
parent 25f664e69e
commit a62c3fc522
11 changed files with 21 additions and 21 deletions

View File

@@ -1,16 +1,3 @@
/// Write the implementation of From<> to convert a borrow of the type to an AstNode
macro_rules! to_ast_node {
($inp:ty, $enum:expr) => {
impl<'r, 's> From<$inp> for AstNode<'r, 's> {
fn from(value: $inp) -> Self {
$enum(value)
}
}
};
}
pub(crate) use to_ast_node;
/// Create iterators for ast nodes where it only has to iterate over children
macro_rules! children_iter {
($astnodetype:ty, $itertype:ident, $innertype:ty) => {