MCPcopy Create free account
hub / github.com/nsf/gocode / init

Method init

package_text.go:57–68  ·  view source on GitHub ↗
(data []byte, pfc *package_file_cache)

Source from the content-addressed store, hash-verified

55}
56
57func (p *gc_parser) init(data []byte, pfc *package_file_cache) {
58 p.scanner.Init(bytes.NewReader(data))
59 p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) }
60 p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanStrings |
61 scanner.ScanComments | scanner.ScanChars | scanner.SkipComments
62 p.scanner.Whitespace = 1<<'\t' | 1<<' ' | 1<<'\r' | 1<<'\v' | 1<<'\f'
63 p.scanner.Filename = "package.go"
64 p.next()
65 // and the built-in "unsafe" package to the path_to_name map
66 p.path_to_name = map[string]string{"unsafe": "unsafe"}
67 p.pfc = pfc
68}
69
70func (p *gc_parser) next() {
71 p.tok = p.scanner.Scan()

Callers 1

process_package_dataMethod · 0.95

Calls 2

errorMethod · 0.95
nextMethod · 0.95

Tested by

no test coverage detected