(&mut self, dtype: ArrayDimType)
| 241 | } |
| 242 | |
| 243 | fn parse_domain_bound(&mut self, dtype: ArrayDimType) -> Result<ArrayDomainBound> { |
| 244 | match dtype { |
| 245 | ArrayDimType::Int64 => Ok(ArrayDomainBound::Int64(self.expect_int()?)), |
| 246 | ArrayDimType::TimestampMs => Ok(ArrayDomainBound::TimestampMs(self.expect_int()?)), |
| 247 | ArrayDimType::Float64 => Ok(ArrayDomainBound::Float64( |
| 248 | self.expect_float_or_int_as_f64()?, |
| 249 | )), |
| 250 | ArrayDimType::String => match self.bump().map(|t| &t.tok) { |
| 251 | Some(Tok::Str(s)) => Ok(ArrayDomainBound::String(s.clone())), |
| 252 | other => Err(self.err(format!("expected string literal, got {other:?}"))), |
| 253 | }, |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | fn parse_attr(&mut self) -> Result<ArrayAttrAst> { |
| 258 | let name = self.expect_ident()?; |
no test coverage detected