organic/src/parser/token.rs

21 lines
403 B
Rust
Raw Normal View History

use super::text::Paragraph;
2022-12-04 04:53:52 +00:00
use super::text::TextElement;
#[derive(Debug)]
pub enum Token<'a> {
TextElement(TextElement<'a>),
Paragraph(Paragraph<'a>),
2022-12-04 04:53:52 +00:00
}
impl<'a> Into<Token<'a>> for TextElement<'a> {
fn into(self) -> Token<'a> {
Token::TextElement(self)
}
}
impl<'a> Into<Token<'a>> for Paragraph<'a> {
fn into(self) -> Token<'a> {
Token::Paragraph(self)
}
}