From 6b8f0663ea5a443236b5c7fd9729bfa89f70d168 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 17 Mar 2022 16:10:56 -0400 Subject: [PATCH] tamer: xir::{tree::=>}attr: Move With the introduction of XIRF, attribute parsing is no longer a XIRT thing. DEV-10863 --- tamer/src/xir.rs | 1 + tamer/src/xir/flat.rs | 5 +---- tamer/src/xir/tree.rs | 12 +++--------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/tamer/src/xir.rs b/tamer/src/xir.rs index c622e0d3..ce462c02 100644 --- a/tamer/src/xir.rs +++ b/tamer/src/xir.rs @@ -69,6 +69,7 @@ pub use error::Error; mod escape; pub use escape::{DefaultEscaper, Escaper}; +pub mod attr; pub mod flat; pub mod iter; pub mod parse; diff --git a/tamer/src/xir/flat.rs b/tamer/src/xir/flat.rs index 5710a075..2c4ce1db 100644 --- a/tamer/src/xir/flat.rs +++ b/tamer/src/xir/flat.rs @@ -37,14 +37,11 @@ //! of the caller. use super::{ + attr::{Attr, AttrParseError, AttrParseState}, parse::{ ParseState, ParseStateResult, ParseStatus, ParsedResult, TransitionResult, }, - tree::{ - attr::{AttrParseError, AttrParseState}, - Attr, - }, QName, Token, TokenStream, Whitespace, }; use crate::{span::Span, sym::SymbolId, xir::parse::Transition}; diff --git a/tamer/src/xir/tree.rs b/tamer/src/xir/tree.rs index 7feaca27..9a5846b8 100644 --- a/tamer/src/xir/tree.rs +++ b/tamer/src/xir/tree.rs @@ -173,13 +173,9 @@ //! //! [state machine]: https://en.wikipedia.org/wiki/Finite-state_machine -pub mod attr; - -use self::{ - super::parse::{ - ParseError, ParseResult, ParseState, ParseStatus, ParsedResult, - }, - attr::{AttrParseError, AttrParseState}, +use self::super::{ + attr::{Attr, AttrList, AttrParseError, AttrParseState}, + parse::{ParseError, ParseResult, ParseState, ParseStatus, ParsedResult}, }; use super::{ @@ -188,8 +184,6 @@ use super::{ use crate::{span::Span, sym::SymbolId, xir::parse::Transition}; use std::{error::Error, fmt::Display, result}; -pub use attr::{Attr, AttrList}; - type Parsed = super::parse::Parsed; /// A XIR tree (XIRT).