MCPcopy Create free account
hub / github.com/davidblewett/rure-python / cmd_captures

Function cmd_captures

regex/regex-debug/src/main.rs:186–196  ·  view source on GitHub ↗
(args: &Args)

Source from the content-addressed store, hash-verified

184}
185
186fn cmd_captures(args: &Args) -> Result<()> {
187 let expr = args.parse_one()?;
188 let prog = args.compiler().only_utf8(false).compile(&[expr])?;
189 for (i, name) in prog.captures.iter().enumerate() {
190 match *name {
191 None => println!("{}", i),
192 Some(ref name) => println!("{}:{}", i, name),
193 }
194 }
195 Ok(())
196}
197
198fn cmd_compile(args: &Args) -> Result<()> {
199 let exprs = args.parse_many()?;

Callers 1

runFunction · 0.85

Calls 5

parse_oneMethod · 0.80
compileMethod · 0.80
compilerMethod · 0.80
only_utf8Method · 0.45
iterMethod · 0.45

Tested by

no test coverage detected