Add PlainListItem to ast nodes.

This commit is contained in:
Tom Alexander
2023-09-27 18:21:42 -04:00
parent c5be75ee8d
commit d8c52568db
3 changed files with 84 additions and 262 deletions

View File

@@ -1,3 +1,16 @@
/// 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) => {