MCPcopy Create free account
hub / github.com/google/gapid / parse

Method parse

gapil/api.go:132–150  ·  view source on GitHub ↗
(path file.Path)

Source from the content-addressed store, hash-verified

130}
131
132func (p *Processor) parse(path file.Path) (*ast.API, parse.ErrorList) {
133 path = p.Loader.Find(path)
134 absname := path.System()
135 p.parsedLock.Lock()
136 res, ok := p.Parsed[absname]
137 p.parsedLock.Unlock()
138 if ok {
139 return res.API, res.Errs
140 }
141 info, err := p.Loader.Load(path)
142 if err != nil {
143 return nil, parse.ErrorList{parse.Error{Message: err.Error()}}
144 }
145 api, errs := parser.Parse(absname, string(info), &p.Mappings.AST)
146 p.parsedLock.Lock()
147 p.Parsed[absname] = ParseResult{api, errs}
148 p.parsedLock.Unlock()
149 return api, errs
150}
151
152// Resolve resolves the api file with a default Processor.
153// See Processor.Resolve for details.

Callers 2

ParseMethod · 0.95

Calls 7

SystemMethod · 0.80
LockMethod · 0.80
UnlockMethod · 0.80
FindMethod · 0.65
LoadMethod · 0.65
ErrorMethod · 0.65
ParseMethod · 0.65

Tested by

no test coverage detected