pub struct RifGenSrc {
pub top: RifGenTop,
pub rifs: HashMap<String, Rif>,
pub rifmux: HashMap<String, Rifmux>,
pub paths: HashMap<String, PathBuf>,
/* private fields */
}Expand description
Source RIF Generator (result of parsing)
Fields§
§top: RifGenTopTop level
rifs: HashMap<String, Rif>Dictionary of all rif definitions parsed
rifmux: HashMap<String, Rifmux>Dictionary of all rifmux parsed
paths: HashMap<String, PathBuf>Path of each rif/rifmux
Implementations§
Source§impl RifGenSrc
impl RifGenSrc
pub fn new() -> RifGenSrc
Sourcepub fn from_file<P>(
filename: P,
includes: &[String],
cfg: &ParserCfg,
) -> Result<RifGenSrc, RifError>
pub fn from_file<P>( filename: P, includes: &[String], cfg: &ParserCfg, ) -> Result<RifGenSrc, RifError>
Generate a source object from a file the includes path are used to find and parse any included/referenced RIF The configuration contains list of reserved keywords and how they should be handled, as well as as setting such as auto-legacy
pub fn parse_file<P>( &mut self, filename: P, cfg: &ParserCfg, ) -> Result<HashSet<String>, RifError>
pub fn get_rif<'a>(&'a self, name: &'a str) -> Option<&'a Rif>
pub fn get_rifmux<'a>(&'a self, name: &'a str) -> Option<&'a Rifmux>
Sourcepub fn check_reg_uniq(&self, name: &str) -> bool
pub fn check_reg_uniq(&self, name: &str) -> bool
Check that a register is uniquely defined
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RifGenSrc
impl RefUnwindSafe for RifGenSrc
impl Send for RifGenSrc
impl Sync for RifGenSrc
impl Unpin for RifGenSrc
impl UnsafeUnpin for RifGenSrc
impl UnwindSafe for RifGenSrc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more