VarDecl = "var" ExportedName Type .
()
| 552 | |
| 553 | // VarDecl = "var" ExportedName Type . |
| 554 | func (p *gc_parser) parse_var_decl() (string, *ast.GenDecl) { |
| 555 | p.expect_keyword("var") |
| 556 | name := p.parse_exported_name() |
| 557 | typ := p.parse_type() |
| 558 | return name.X.(*ast.Ident).Name, &ast.GenDecl{ |
| 559 | Tok: token.VAR, |
| 560 | Specs: []ast.Spec{ |
| 561 | &ast.ValueSpec{ |
| 562 | Names: []*ast.Ident{name.Sel}, |
| 563 | Type: typ, |
| 564 | }, |
| 565 | }, |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | // FuncBody = "{" ... "}" . |
| 570 | func (p *gc_parser) parse_func_body() { |
no test coverage detected