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

Function parse

parse.go:37–51  ·  view source on GitHub ↗
(i chan item, opts ...*Options)

Source from the content-addressed store, hash-verified

35}
36
37func parse(i chan item, opts ...*Options) *parser {
38 var o *Options
39 if len(opts) != 0 {
40 o = opts[0]
41 }
42 p := &parser{
43 in: i,
44 stop: make(chan error),
45 Emit: &Emitted{},
46 Options: o,
47 recache: make(map[string]*regexp.Regexp),
48 }
49 go p.run()
50 return p
51}
52
53func (p *parser) compileRegexp(s string) (re *regexp.Regexp, err error) {
54 re, ok := p.recache[s]

Callers 1

CompileFunction · 0.85

Calls 1

runMethod · 0.95

Tested by

no test coverage detected