(&self, token: Option<TokenTree>)
| 468 | } |
| 469 | |
| 470 | fn build_get(&self, token: Option<TokenTree>) -> Result<MirRelationExpr, String> { |
| 471 | match token { |
| 472 | Some(TokenTree::Ident(ident)) => { |
| 473 | let name = ident.to_string(); |
| 474 | match self.scope.get(&name) { |
| 475 | Some((id, typ)) => Ok(MirRelationExpr::Get { |
| 476 | id, |
| 477 | typ, |
| 478 | access_strategy: AccessStrategy::UnknownOrLocal, |
| 479 | }), |
| 480 | None => match self.catalog.get(&name) { |
| 481 | None => Err(format!("no catalog object named {}", name)), |
| 482 | Some((id, typ)) => Ok(MirRelationExpr::Get { |
| 483 | id: Id::Global(*id), |
| 484 | typ: ReprRelationType::from(typ), |
| 485 | access_strategy: AccessStrategy::UnknownOrLocal, |
| 486 | }), |
| 487 | }, |
| 488 | } |
| 489 | } |
| 490 | invalid_token => Err(format!( |
| 491 | "Invalid get specification {:?}", |
| 492 | invalid_token.map(|token_tree| format!("`{}`", token_tree)) |
| 493 | )), |
| 494 | } |
| 495 | } |
| 496 | |
| 497 | fn build_let<I>(&mut self, stream_iter: &mut I) -> Result<MirRelationExpr, String> |
| 498 | where |
no test coverage detected