plantuml_parser/dsl/
block.rs1mod block_comment;
2
3pub use block_comment::BlockComment;
4
5use crate::{ParseContainer, ParseResult};
6
7#[derive(Clone, Debug)]
9pub struct PlantUmlBlock {
10 kind: PlantUmlBlockKind,
11}
12
13#[derive(Clone, Debug)]
15pub enum PlantUmlBlockKind {
16 BlockComment(BlockComment),
22}
23
24impl PlantUmlBlock {
25 pub fn parse(input: ParseContainer) -> ParseResult<Self> {
28 let (rest, (parsed, comment)) = BlockComment::parse(input)?;
29
30 let ret = Self {
31 kind: PlantUmlBlockKind::BlockComment(comment),
32 };
33 Ok((rest, (parsed, ret)))
34 }
35
36 pub fn kind(&self) -> &PlantUmlBlockKind {
38 &self.kind
39 }
40}