ExportedName = "@" ImportPath "." dotIdentifier .
()
| 169 | |
| 170 | // ExportedName = "@" ImportPath "." dotIdentifier . |
| 171 | func (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 . |
| 185 | func (p *gc_parser) parse_name() (string, ast.Expr) { |
no test coverage detected