INNER CODE UNIT · Rust

parse_data_block

steineggerlab/folddisco · lib/pdbtbx-cif/src/lib.rs:22

fn parse_data_block(input: &mut Position<'_>) -> Result<DataBlock, PDBError> {
    if start_with(input, "data_").is_none() {
        return Err(PDBError::new(
            ErrorLevel::BreakingError,
            "Data Block not opened",
            "The data block should be opened with \"data_\".",
            Context::position(input),
        ));
        
    };
    let identifier = parse_identifier(input);
    let mut block = DataBlock {
        name: identifier.to_string(),
        items: Vec::new(),
    };
    loop {
        trim_comments_and_whitespace(input);
        if input.text.is_empty() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…