pub fn from_file(filename: impl AsRef<Path>) -> io::Result<Self> {
        let input = string_utils::read_lines_from_file(filename)?;
        let result = input
            .iter()
            .map(|x| parse_symbol_table_entry(x))
            .filter(|x| x.is_ok())
            .map(|x| x.unwrap())
            .map(|(_, result)| result)
            .collect::<SymbolTable>();
        Ok(result)
    }
/// Creates a symbol table from a file
///
/// # Arguments
/// * 'filename' - Path/filename to read
///
/// # Examples
/// ```ignore
/// let symbol_table = symbol_table::SymbolTable::from_file("binary.txt")?;
/// ```
Creates a symbol table from a file
Creates a symbol table from a file
pub fn from_file(filename: impl AsRef<Path>) -> io::Result<Self> {
        let input = string_utils::read_lines_from_file(filename)?;
        let result = input
            .iter()
            .map(|x| parse_symbol_table_entry(x))
            .filter(|x| x.is_ok())
            .map(|x| x.unwrap())
            .map(|(_, result)| result)
            .collect::<SymbolTable>();
        Ok(result)
    }
pub fn from_file ( filename : impl AsRef < Path > ) -> io :: Result < Self > { let input = string_utils :: read_lines_from_file ( filename ) ? ; let result = input . iter ( ) . map ( | x | parse_symbol_table_entry ( x ) ) . filter ( | x | x . is_ok ( ) ) . map ( | x | x . unwrap ( ) ) . map ( | ( _ , result ) | result ) . collect :: < SymbolTable > ( ) ; Ok ( result ) }
Creates a symbol table from a file
Creates a symbol table from a file
filename
impl AsRef<Path>
examples
```ignore
let symbol_table = symbol_table::SymbolTable::from_file("binary.txt")?;
```
` ` ` ignore let symbol_table = symbol_table :: SymbolTable :: from_file ( " binary . txt " ) ? ; ` ` `