tamer: obj::xmlo::asg_builder: Remove example for now

Just until the new xmlo reader is ready, since it will be changing slightly
and fails to compile with the feature flag on now.

DEV-10863
main
Mike Gerwitz 2021-10-28 21:17:53 -04:00
parent e9871541a8
commit f0f58a6e16
1 changed files with 0 additions and 29 deletions

View File

@ -37,35 +37,6 @@
//! package paths;
//! it is wrapped in an [`Option`] so that [`take`](Option::take) can be
//! used to take ownership over the data.
//!
//! ```
//! use tamer::global;
//! use tamer::ir::asg::{DefaultAsg, IdentObject};
//! use tamer::obj::xmlo::{AsgBuilder, AsgBuilderState, XmloReader};
//! use tamer::sym::GlobalSymbolIntern;
//! use fxhash::FxBuildHasher;
//! use std::io::BufReader;
//!
//! let src_xmlo: &[u8] = br#"<package>
//! <preproc:symtable>
//! <preproc:sym name="foo" type="cgen" src="dep/package" />
//! </preproc:symtable>
//! <preproc:fragments>
//! </preproc:fragments>
//! </package>"#;
//!
//! let xmlo = XmloReader::from(src_xmlo);
//! let mut asg = DefaultAsg::<IdentObject>::new();
//!
//! let state = asg.import_xmlo(xmlo, AsgBuilderState::<FxBuildHasher, _>::new());
//!
//! // Use `state.found` to recursively load dependencies.
//! let AsgBuilderState { found, .. } = state.expect("unexpected failure");
//! assert_eq!(
//! vec![&"dep/package".intern()],
//! found.unwrap().iter().collect::<Vec<_>>(),
//! );
//! ```
use super::reader::{XmloError, XmloEvent, XmloResult};
use crate::ir::asg::{