tool: separate tree parsing and xml parsing - #588
Conversation
Separate XML specific parsing details into `parse_xml`, so that `parse` can be reused Signed-off-by: Charlotte Fulham <charlotte.fulham@anu.edu.au>
| } | ||
|
|
||
| pub fn parse( | ||
| xml_sdf: SystemDescriptionFile, |
There was a problem hiding this comment.
hm, I think I'd rather than this takes a &Path and constructs XmlSystemDescription internally. not much point exposing that in an external interface if it's pointless.
then can leave off the pub(crate) change.
Speaking of I should probably go through and audit what needs to be public vs not..
There was a problem hiding this comment.
My main thinking with this was that parse_xml uses it for check_no_text (which to be fair may not actually need it) and didn't really want to have to construct it twice if we don't have to, but ultimately it doesn't really matter either way.
There was a problem hiding this comment.
Nah, should be fine to construct again.
It's a struct with one member. The in-memory-layout will (almost certainly) be the same as the member itself.
Moves XML SDF specific parsing logic into
parse_xmland node tree parsing intoparse.