(
vm: &VirtualMachine,
source_file: &SourceFile,
constant: ast::ExprBytesLiteral,
)
| 392 | } |
| 393 | |
| 394 | pub(super) fn bytes_literal_to_object( |
| 395 | vm: &VirtualMachine, |
| 396 | source_file: &SourceFile, |
| 397 | constant: ast::ExprBytesLiteral, |
| 398 | ) -> PyObjectRef { |
| 399 | let ast::ExprBytesLiteral { |
| 400 | node_index: _, |
| 401 | range, |
| 402 | value, |
| 403 | } = constant; |
| 404 | let bytes = value.as_slice().iter().flat_map(|b| b.value.iter()); |
| 405 | let c = Constant::new_bytes(bytes.copied().collect(), range); |
| 406 | c.ast_to_object(vm, source_file) |
| 407 | } |
| 408 | |
| 409 | pub(super) fn boolean_literal_to_object( |
| 410 | vm: &VirtualMachine, |
no test coverage detected