(
vm: &VirtualMachine,
source_file: &SourceFile,
object: PyObjectRef,
)
| 119 | } |
| 120 | |
| 121 | fn ast_from_object( |
| 122 | vm: &VirtualMachine, |
| 123 | source_file: &SourceFile, |
| 124 | object: PyObjectRef, |
| 125 | ) -> PyResult<Self> { |
| 126 | let value_object = get_node_field(vm, &object, "value", "Constant")?; |
| 127 | let value = Node::ast_from_object(vm, source_file, value_object)?; |
| 128 | |
| 129 | Ok(Self { |
| 130 | value, |
| 131 | // kind: get_node_field_opt(_vm, &_object, "kind")? |
| 132 | // .map(|obj| Node::ast_from_object(_vm, obj)) |
| 133 | // .transpose()?, |
| 134 | range: range_from_object(vm, source_file, object, "Constant")?, |
| 135 | }) |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | impl Node for ConstantLiteral { |
nothing calls this directly
no test coverage detected