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

Method compile_fstring_part_literal_value

crates/codegen/src/compile.rs:9433–9440  ·  view source on GitHub ↗
(&self, string: &ast::StringLiteral)

Source from the content-addressed store, hash-verified

9431 }
9432
9433 fn compile_fstring_part_literal_value(&self, string: &ast::StringLiteral) -> Wtf8Buf {
9434 if string.value.contains(char::REPLACEMENT_CHARACTER) {
9435 let source = self.source_file.slice(string.range);
9436 crate::string_parser::parse_string_literal(source, string.flags.into()).into()
9437 } else {
9438 string.value.to_string().into()
9439 }
9440 }
9441
9442 fn arg_constant(&mut self, constant: ConstantData) -> oparg::ConstIdx {
9443 let info = self.current_code_info();

Callers 1

Calls 4

parse_string_literalFunction · 0.85
to_stringMethod · 0.80
containsMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected