Add target.
This commit is contained in:
@@ -2,16 +2,18 @@ use crate::error::CustomError;
|
||||
|
||||
use super::plain_text::IPlainText;
|
||||
use super::registry::Registry;
|
||||
use super::ITarget;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) enum IObject {
|
||||
PlainText(IPlainText),
|
||||
Target(ITarget),
|
||||
}
|
||||
|
||||
impl IObject {
|
||||
pub(crate) fn new(
|
||||
registry: &mut Registry<'_>,
|
||||
obj: &organic::types::Object<'_>,
|
||||
pub(crate) fn new<'parse>(
|
||||
registry: &mut Registry<'parse>,
|
||||
obj: &organic::types::Object<'parse>,
|
||||
) -> Result<IObject, CustomError> {
|
||||
match obj {
|
||||
organic::types::Object::Bold(_) => todo!(),
|
||||
@@ -38,7 +40,9 @@ impl IObject {
|
||||
organic::types::Object::InlineBabelCall(_) => todo!(),
|
||||
organic::types::Object::InlineSourceBlock(_) => todo!(),
|
||||
organic::types::Object::LineBreak(_) => todo!(),
|
||||
organic::types::Object::Target(_) => todo!(),
|
||||
organic::types::Object::Target(target) => {
|
||||
Ok(IObject::Target(ITarget::new(registry, target)?))
|
||||
}
|
||||
organic::types::Object::StatisticsCookie(_) => todo!(),
|
||||
organic::types::Object::Subscript(_) => todo!(),
|
||||
organic::types::Object::Superscript(_) => todo!(),
|
||||
|
||||
Reference in New Issue
Block a user