(&mut self, ctx: &StringContext<'_>)
| 981 | } |
| 982 | |
| 983 | fn visit_String(&mut self, ctx: &StringContext<'_>) -> Self::Return { |
| 984 | if let Some(token) = ctx.tok.as_deref() { |
| 985 | match parse::parse_string(&ctx.get_text()) { |
| 986 | Ok(string) => self |
| 987 | .helper |
| 988 | .next_expr(token, Expr::Literal(LiteralValue::String(string.into()))), |
| 989 | Err(e) => self.report_error::<ParseError, _>( |
| 990 | token, |
| 991 | None, |
| 992 | format!("invalid string literal: {e:?}"), |
| 993 | ), |
| 994 | } |
| 995 | } else { |
| 996 | self.report_error::<ParseError, _>( |
| 997 | &ctx.start(), |
| 998 | None::<ParseError>, |
| 999 | "Incomplete string!", |
| 1000 | ) |
| 1001 | } |
| 1002 | } |
| 1003 | |
| 1004 | fn visit_Bytes(&mut self, ctx: &BytesContext<'_>) -> Self::Return { |
| 1005 | if let Some(token) = ctx.tok.as_deref() { |
nothing calls this directly
no test coverage detected