mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/syntax: remove unused code
Change-Id: I9c75dee7e4498cc11c08cad1ae34ff2af75f1469 Reviewed-on: https://go-review.googlesource.com/69071 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
a04adcaf35
commit
1ddacfea7b
1 changed files with 5 additions and 16 deletions
|
|
@ -1171,22 +1171,6 @@ func (p *parser) interfaceType() *InterfaceType {
|
||||||
return typ
|
return typ
|
||||||
}
|
}
|
||||||
|
|
||||||
// FunctionBody = Block .
|
|
||||||
func (p *parser) funcBody() []Stmt {
|
|
||||||
if trace {
|
|
||||||
defer p.trace("funcBody")()
|
|
||||||
}
|
|
||||||
|
|
||||||
p.fnest++
|
|
||||||
body := p.stmtList()
|
|
||||||
p.fnest--
|
|
||||||
|
|
||||||
if body == nil {
|
|
||||||
body = []Stmt{new(EmptyStmt)}
|
|
||||||
}
|
|
||||||
return body
|
|
||||||
}
|
|
||||||
|
|
||||||
// Result = Parameters | Type .
|
// Result = Parameters | Type .
|
||||||
func (p *parser) funcResult() []*Field {
|
func (p *parser) funcResult() []*Field {
|
||||||
if trace {
|
if trace {
|
||||||
|
|
@ -1676,6 +1660,11 @@ func (p *parser) blockStmt(context string) *BlockStmt {
|
||||||
defer p.trace("blockStmt")()
|
defer p.trace("blockStmt")()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(gri) If we are in a function we should update p.fnest
|
||||||
|
// accordingly. Currently p.fnest is always zero and thus not
|
||||||
|
// used in error recovery.
|
||||||
|
// Not enabled for for because it performs worse for some code
|
||||||
|
// without more fine tuning (see example in #22164).
|
||||||
s := new(BlockStmt)
|
s := new(BlockStmt)
|
||||||
s.pos = p.pos()
|
s.pos = p.pos()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue