FuncDecl = "func" ExportedName Signature [ FuncBody ] .
()
| 581 | |
| 582 | // FuncDecl = "func" ExportedName Signature [ FuncBody ] . |
| 583 | func (p *gc_parser) parse_func_decl() (string, *ast.FuncDecl) { |
| 584 | // "func" was already consumed by lookahead |
| 585 | name := p.parse_exported_name() |
| 586 | typ := p.parse_signature() |
| 587 | if p.tok == '{' { |
| 588 | p.parse_func_body() |
| 589 | } |
| 590 | return name.X.(*ast.Ident).Name, &ast.FuncDecl{ |
| 591 | Name: name.Sel, |
| 592 | Type: typ, |
| 593 | } |
| 594 | } |
| 595 | |
| 596 | func strip_method_receiver(recv *ast.FieldList) string { |
| 597 | var sel *ast.SelectorExpr |
no test coverage detected