Compare export type.
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user