Method
parse_attribute_ref
(
&mut self,
node: Node,
value: Expression,
)
Source from the content-addressed store, hash-verified
| 2403 | } |
| 2404 | |
| 2405 | fn parse_attribute_ref( |
| 2406 | &mut self, |
| 2407 | node: Node, |
| 2408 | value: Expression, |
| 2409 | ) -> Result<Expression, ParsingError> { |
| 2410 | let mut expr = Ok(value); |
| 2411 | while self.eat(Kind::Dot) { |
| 2412 | let attr_val = self.cur_token().to_string(self.source); |
| 2413 | self.expect(Kind::Identifier)?; |
| 2414 | expr = Ok(Expression::Attribute(Box::new(Attribute { |
| 2415 | node: self.finish_node(node), |
| 2416 | value: expr?, |
| 2417 | attr: attr_val, |
| 2418 | }))); |
| 2419 | } |
| 2420 | expr |
| 2421 | } |
| 2422 | |
| 2423 | fn parse_subscript( |
| 2424 | &mut self, |
Tested by
no test coverage detected