• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kaidokert / xacro / 20647483489

01 Jan 2026 11:33PM UTC coverage: 82.808%. First build
20647483489

Pull #9

github

web-flow
Merge edb0c0115 into be2908bba
Pull Request #9: Add CLI binary with argument parsing

0 of 63 new or added lines in 3 files covered. (0.0%)

920 of 1111 relevant lines covered (82.81%)

59.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/processor.rs
1
use crate::{
2
    error::XacroError,
3
    features::{
4
        conditions::ConditionProcessor, includes::IncludeProcessor, loops::LoopProcessor,
5
        macros::MacroProcessor, properties::PropertyProcessor,
6
    },
7
};
8

9
pub struct XacroProcessor {
10
    macros: MacroProcessor,
11
    properties: PropertyProcessor,
12
    conditions: ConditionProcessor,
13
    loops: LoopProcessor,
14
    includes: IncludeProcessor,
15
}
16

17
impl XacroProcessor {
18
    #[allow(clippy::new_without_default)]
19
    pub fn new() -> Self {
×
20
        Self {
×
21
            includes: IncludeProcessor::new(),
×
22
            macros: MacroProcessor::new(),
×
23
            properties: PropertyProcessor::new(),
×
24
            conditions: ConditionProcessor::new(),
×
25
            loops: LoopProcessor::new(),
×
26
        }
×
27
    }
×
28

29
    pub fn run<P: AsRef<std::path::Path>>(
×
30
        &self,
×
31
        path: P,
×
32
    ) -> Result<String, XacroError> {
×
33
        let xml = XacroProcessor::parse_file(&path)?;
×
34

35
        // 2. Process features in order
36
        let xml = self.includes.process(xml, path.as_ref())?;
×
37

38
        // CRITICAL: PropertyProcessor now returns (Element, HashMap)
39
        // The HashMap contains all properties for use by subsequent processors
40
        let (xml, properties) = self.properties.process(xml)?;
×
41

42
        // Pass properties to MacroProcessor so macros can reference global properties
43
        let xml = self.macros.process(xml, &properties)?;
×
44

45
        // Pass properties to ConditionProcessor for expression evaluation
46
        let xml = self.conditions.process(xml, &properties)?;
×
47
        let xml = self.loops.process(xml)?;
×
48

NEW
49
        XacroProcessor::serialize(xml)
×
50
    }
×
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc