1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::*;

use crate::svd::ReadAction;
impl Parse for ReadAction {
    type Object = Self;
    type Error = SVDErrorAt;
    type Config = Config;

    fn parse(tree: &Node, _config: &Self::Config) -> Result<Self, Self::Error> {
        let text = tree.get_text()?;

        Self::parse_str(text).ok_or_else(|| SVDError::InvalidReadAction(text.into()).at(tree.id()))
    }
}