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

Method parse_exported_name

package_text.go:171–182  ·  view source on GitHub ↗

ExportedName = "@" ImportPath "." dotIdentifier .

()

Source from the content-addressed store, hash-verified

169
170// ExportedName = "@" ImportPath "." dotIdentifier .
171func (p *gc_parser) parse_exported_name() *ast.SelectorExpr {
172 p.expect('@')
173 pkg := p.parse_package()
174 if pkg.Name == "" {
175 pkg.Name = "!" + p.pfc.name + "!" + p.pfc.defalias
176 } else {
177 pkg.Name = p.path_to_name[pkg.Name]
178 }
179 p.expect('.')
180 name := ast.NewIdent(p.parse_dot_ident())
181 return &ast.SelectorExpr{X: pkg, Sel: name}
182}
183
184// Name = identifier | "?" | ExportedName .
185func (p *gc_parser) parse_name() (string, ast.Expr) {

Callers 6

parse_nameMethod · 0.95
parse_typeMethod · 0.95
parse_const_declMethod · 0.95
parse_type_declMethod · 0.95
parse_var_declMethod · 0.95
parse_func_declMethod · 0.95

Calls 3

expectMethod · 0.95
parse_packageMethod · 0.95
parse_dot_identMethod · 0.95

Tested by

no test coverage detected