()
| 211 | } |
| 212 | |
| 213 | fn param<'a>() -> impl Parser<'a, ParserInput<'a>, TokenKind, ParserError<'a>> { |
| 214 | just('$') |
| 215 | .ignore_then( |
| 216 | any() |
| 217 | .filter(|c: &char| c.is_alphanumeric() || *c == '_' || *c == '.') |
| 218 | .repeated() |
| 219 | .to_slice() |
| 220 | .map(|s: &str| s.to_string()), |
| 221 | ) |
| 222 | .map(TokenKind::Param) |
| 223 | } |
| 224 | |
| 225 | fn interpolation<'a>() -> impl Parser<'a, ParserInput<'a>, TokenKind, ParserError<'a>> { |
| 226 | // For s-strings and f-strings, use the same multi-quote string parser |