Compare export type.

This commit is contained in:
Tom Alexander
2023-10-05 02:15:32 -04:00
parent 1da521b08a
commit 58ca9569a6
3 changed files with 22 additions and 1 deletions

View File

@@ -64,6 +64,7 @@ pub struct ExampleBlock<'s> {
pub struct ExportBlock<'s> {
pub source: &'s str,
pub name: Option<&'s str>,
pub export_type: Option<&'s str>,
pub data: Option<&'s str>,
pub contents: String,
}
@@ -266,3 +267,9 @@ impl<'s> Comment<'s> {
ret
}
}
impl<'s> ExportBlock<'s> {
pub fn get_export_type(&self) -> Option<String> {
self.export_type.map(|s| s.to_uppercase())
}
}