INNER CODE UNIT · Rust
parse_value
steineggerlab/folddisco · lib/pdbtbx-cif/src/lib.rs:139
fn parse_value(input: &mut Position<'_>) -> Result<Value, PDBError> {
let start = *input;
trim_comments_and_whitespace(input);
if input.text.is_empty() {
Err(PDBError::new(
ErrorLevel::BreakingError,
"Empty value",
"No text left",
Context::position(input),
))
// The following are reserved words, and need to be checked with a branching position as otherwise it would consume the keyword if matched
} else if start_with(&mut input.clone(), "data_").is_some()
|| start_with(&mut input.clone(), "global_").is_some()
|| start_with(&mut input.clone(), "loop_").is_some()
|| start_with(&mut input.clone(), "save_").is_some()
|| start_with(&mut input.clone(), "stop_").is_some()
{
Err(PDBError::new(