MCPcopy Index your code
hub / github.com/RustPython/RustPython / boolean_literal_to_object

Function boolean_literal_to_object

crates/vm/src/stdlib/_ast/constant.rs:409–421  ·  view source on GitHub ↗
(
    vm: &VirtualMachine,
    source_file: &SourceFile,
    constant: ast::ExprBooleanLiteral,
)

Source from the content-addressed store, hash-verified

407}
408
409pub(super) fn boolean_literal_to_object(
410 vm: &VirtualMachine,
411 source_file: &SourceFile,
412 constant: ast::ExprBooleanLiteral,
413) -> PyObjectRef {
414 let ast::ExprBooleanLiteral {
415 node_index: _,
416 range,
417 value,
418 } = constant;
419 let c = Constant::new_bool(value, range);
420 c.ast_to_object(vm, source_file)
421}
422
423pub(super) fn none_literal_to_object(
424 vm: &VirtualMachine,

Callers 1

ast_to_objectMethod · 0.85

Calls 1

ast_to_objectMethod · 0.45

Tested by

no test coverage detected