MCPcopy Create free account
hub / github.com/as/edit / run

Method run

parse.go:450–471  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

448}
449
450func (p *parser) run() {
451 tok := p.Next()
452 if tok.kind == kindEof || p.err != nil {
453 if tok.kind == kindEof {
454 p.fatal(fmt.Errorf("run: unexpected eof"))
455 return
456 }
457 p.fatal(fmt.Errorf("run: %s", p.err))
458 return
459 }
460 p.addr = parseAddr(p)
461 for {
462 c := parseCmd(p)
463 if c == nil {
464 break
465 }
466 p.cmd = append(p.cmd, c)
467 p.Next()
468 }
469 p.stop <- p.err
470 close(p.stop)
471}
472
473func (p *parser) mustatoi(s string) int64 {
474 i, err := strconv.Atoi(s)

Callers 1

parseFunction · 0.95

Calls 4

NextMethod · 0.95
fatalMethod · 0.95
parseAddrFunction · 0.85
parseCmdFunction · 0.85

Tested by

no test coverage detected