svd_parser/readaction.rs
1use super::*;
2
3use crate::svd::ReadAction;
4impl Parse for ReadAction {
5 type Object = Self;
6 type Error = SVDErrorAt;
7 type Config = Config;
8
9 fn parse(tree: &Node, _config: &Self::Config) -> Result<Self, Self::Error> {
10 let text = tree.get_text()?;
11
12 Self::parse_str(text).ok_or_else(|| SVDError::InvalidReadAction(text.into()).at(tree.id()))
13 }
14}