(
state: &mut ParserState<'heap, '_, '_>,
key: &Key<'_>,
)
| 33 | |
| 34 | impl<'heap> StructNode<'heap> { |
| 35 | pub(crate) fn parse( |
| 36 | state: &mut ParserState<'heap, '_, '_>, |
| 37 | key: &Key<'_>, |
| 38 | ) -> Result<Self, ParserDiagnostic> { |
| 39 | let expr = parse_struct(state)?; |
| 40 | |
| 41 | Ok(Self { |
| 42 | key_span: key.span, |
| 43 | expr, |
| 44 | r#type: None, |
| 45 | }) |
| 46 | } |
| 47 | |
| 48 | pub(crate) fn with_type(mut self, type_node: TypeNode<'heap>) -> Self { |
| 49 | self.r#type = Some(type_node); |
nothing calls this directly
no test coverage detected