(input: ParseStream<'_>)
| 318 | } |
| 319 | |
| 320 | fn parse_str(input: ParseStream<'_>) -> ParseResult<LitStr> { |
| 321 | let span = input.span(); |
| 322 | if input.peek(LitStr) { |
| 323 | input.parse() |
| 324 | } else if let Ok(mac) = input.parse::<Macro>() { |
| 325 | Ok(LitStr::new(&mac.tokens.to_string(), mac.span())) |
| 326 | } else { |
| 327 | Err(syn::Error::new(span, "Expected string or stringify macro")) |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | struct PyCompileArgs { |
| 332 | source: CompilationSource, |