MCPcopy Index your code
hub / github.com/AI45Lab/Code / parse_quoted_string

Method parse_quoted_string

core/src/tools/builtin/bash.rs:911–931  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

909 }
910
911 fn parse_quoted_string(&mut self) -> Option<String> {
912 let quote = self.next()?;
913 let mut out = String::new();
914 while let Some(ch) = self.next() {
915 if ch == '\\' {
916 let escaped = self.next()?;
917 out.push(match escaped {
918 'n' => '\n',
919 'r' => '\r',
920 't' => '\t',
921 other => other,
922 });
923 continue;
924 }
925 if ch == quote {
926 return Some(out);
927 }
928 out.push(ch);
929 }
930 None
931 }
932
933 fn parse_bare_key(&mut self) -> Option<String> {
934 let start = self.pos;

Callers 2

parse_valueMethod · 0.80
parse_objectMethod · 0.80

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected