(data []byte, pfc *package_file_cache)
| 55 | } |
| 56 | |
| 57 | func (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 | |
| 70 | func (p *gc_parser) next() { |
| 71 | p.tok = p.scanner.Scan() |
no test coverage detected