notedown_ast 0.14.9

Notedown Abstract Syntax Tree
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

impl ASTKind {
    pub fn as_list_view(&self) -> Option<ListView> {
        match self {
            ASTKind::ListView(v) => Some((**v).to_owned()),
            _ => None,
        }
    }
    pub fn as_list_text(&self) -> Option<TextKind> {
        match self {
            ASTKind::TextSpan(v) => Some((**v).to_owned()),
            _ => None,
        }
    }
}