pub(crate) fn parse_string_array(array: Pair) -> Result<Vec<String>> {
  let mut ret = Vec::new();

  for field in array.into_inner() {
    match field.as_rule() {
      Rule::string => {
        let s = unquote(field.as_str()).context(UnescapeError)?;

        ret.push(s);
      },
      Rule::comment => continue,
      _ => return Err(unexpected_token(field))
    }
  }

  Ok(ret)
}
/// Given a node ostensibly containing a string array, returns an unescaped
/// array of strings
Given a node ostensibly containing a string array, returns an unescaped
array of strings
Given a node ostensibly containing a string array returns an unescaped array of strings
pub(crate) fn parse_string_array(array: Pair) -> Result<Vec<String>> {
  let mut ret = Vec::new();
  for field in array.into_inner() {
    match field.as_rule() {
      Rule::string => {
        let s = unquote(field.as_str()).context(UnescapeError)?;
        ret.push(s);
      },
      Rule::comment => continue,
      _ => return Err(unexpected_token(field))
    }
  }
  Ok(ret)
}
pub ( crate ) fn parse_string_array ( array : Pair ) -> Result < Vec < String > > { let mut ret = Vec :: new ( ) ; for field in array . into_inner ( ) { match field . as_rule ( ) { Rule :: string => { let s = unquote ( field . as_str ( ) ) . context ( UnescapeError ) ? ; ret . push ( s ) ; } , Rule :: comment => continue , _ => return Err ( unexpected_token ( field ) ) } } Ok ( ret ) }
Given a node ostensibly containing a string array, returns an unescaped
array of strings
Given a node ostensibly containing a string array returns an unescaped array of strings
array
Pair