(
vm: &VirtualMachine,
source_file: &SourceFile,
constant: ast::ExprStringLiteral,
)
| 374 | } |
| 375 | |
| 376 | pub(super) fn string_literal_to_object( |
| 377 | vm: &VirtualMachine, |
| 378 | source_file: &SourceFile, |
| 379 | constant: ast::ExprStringLiteral, |
| 380 | ) -> PyObjectRef { |
| 381 | let ast::ExprStringLiteral { |
| 382 | node_index: _, |
| 383 | range, |
| 384 | value, |
| 385 | } = constant; |
| 386 | let prefix = value |
| 387 | .iter() |
| 388 | .next() |
| 389 | .map_or(StringLiteralPrefix::Empty, |part| part.flags.prefix()); |
| 390 | let c = Constant::new_str(value.to_str(), prefix, range); |
| 391 | c.ast_to_object(vm, source_file) |
| 392 | } |
| 393 | |
| 394 | pub(super) fn bytes_literal_to_object( |
| 395 | vm: &VirtualMachine, |
no test coverage detected