MCPcopy Index your code
hub / github.com/tinylib/msgp / PrintTo

Method PrintTo

parse/getast.go:427–445  ·  view source on GitHub ↗
(p *gen.Printer)

Source from the content-addressed store, hash-verified

425}
426
427func (fs *FileSet) PrintTo(p *gen.Printer) error {
428 fs.applyDirs(p)
429 names := make([]string, 0, len(fs.Identities))
430 for name := range fs.Identities {
431 names = append(names, name)
432 }
433 sort.Strings(names)
434 for _, name := range names {
435 el := fs.Identities[name]
436 el.SetVarname("z")
437 pushstate(el.TypeName())
438 err := p.Print(el)
439 popstate()
440 if err != nil {
441 return err
442 }
443 }
444 return nil
445}
446
447// getTypeSpecs extracts all of the *ast.TypeSpecs in the file
448// into fs.Identities, but does not set the actual element

Callers 1

generateFunction · 0.80

Calls 6

applyDirsMethod · 0.95
pushstateFunction · 0.85
popstateFunction · 0.85
PrintMethod · 0.80
SetVarnameMethod · 0.65
TypeNameMethod · 0.65

Tested by

no test coverage detected