diff --git a/Cargo.lock b/Cargo.lock index dfec57f..5e2c5b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5644,6 +5644,7 @@ dependencies = [ "log", "lru", "ouroboros", + "regex", "resvg", "roxmltree 0.20.0", "rustc-hash 2.1.1", diff --git a/wgui/Cargo.toml b/wgui/Cargo.toml index 46ec4a3..ef76d0d 100644 --- a/wgui/Cargo.toml +++ b/wgui/Cargo.toml @@ -18,6 +18,7 @@ image = { version = "0.25.6", default-features = false, features = [ log = { workspace = true } lru = "0.14.0" ouroboros = "0.18.5" +regex = "1.11.1" resvg = { version = "0.45.1", default-features = false } roxmltree = "0.20.0" rustc-hash = "2.1.1" diff --git a/wgui/src/parser.rs b/wgui/src/parser.rs index 4384c5b..4a355f6 100644 --- a/wgui/src/parser.rs +++ b/wgui/src/parser.rs @@ -40,9 +40,16 @@ struct XmlDocument { } struct Template { - doc: Rc, - node: roxmltree::NodeId, - parameters: HashMap, Rc>, + node_document: Rc, + node: roxmltree::NodeId, // belongs to node_document which could be included in another file +} + +struct ParserFile<'a> { + path: PathBuf, + document: Rc, + ctx: Rc>>, + current_template: Rc