parseUnnamedIncludesResursive resursively parses the unnamed includes from apiname in wd. The full list of includes (named and unnamed) is added to includes.
(base file.Path, includes map[string]*ast.API)
| 208 | // apiname in wd. The full list of includes (named and unnamed) is added to |
| 209 | // includes. |
| 210 | func (p *Processor) parseIncludesResursive(base file.Path, includes map[string]*ast.API) parse.ErrorList { |
| 211 | absname := base.System() |
| 212 | if _, seen := includes[absname]; seen { |
| 213 | return nil |
| 214 | } |
| 215 | api, allErrs := p.parse(base) |
| 216 | if api == nil { |
| 217 | return allErrs |
| 218 | } |
| 219 | includes[absname] = api |
| 220 | for _, i := range api.Imports { |
| 221 | child := p.Loader.Find(base.Parent().Join(i.Path.Value)) |
| 222 | if errs := p.parseIncludesResursive(child, includes); len(errs) > 0 { |
| 223 | allErrs = append(allErrs, errs...) |
| 224 | } |
| 225 | } |
| 226 | return allErrs |
| 227 | } |
| 228 | |
| 229 | // CheckErrors will, if len(errs) > 0, print each of the error messages for the |
| 230 | // specified api and then return the list as a single error. If errs is zero length, |