aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax
diff options
context:
space:
mode:
authorgriesemer <gri@golang.org>2017-10-10 15:53:51 -0700
committerRobert Griesemer <gri@golang.org>2017-10-11 00:29:33 +0000
commitc87fb208c5162e2067138dd8fcea2e5ab8c1d6de (patch)
tree51603b2b2b5e0d0c2ef2cc778107bcddb923aa68 /src/cmd/compile/internal/syntax
parent3a165bba34e2f68c2d0e3ab223efc7b8245d7083 (diff)
downloadgo-c87fb208c5162e2067138dd8fcea2e5ab8c1d6de.tar.xz
cmd/compile/internal/syntax: remove some outdated comments (cleanup)
Change-Id: If242bb99d501420827b764c908580f2363e01ac4 Reviewed-on: https://go-review.googlesource.com/69730 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/syntax')
-rw-r--r--src/cmd/compile/internal/syntax/parser.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/cmd/compile/internal/syntax/parser.go b/src/cmd/compile/internal/syntax/parser.go
index f910052697..845e3f0eb7 100644
--- a/src/cmd/compile/internal/syntax/parser.go
+++ b/src/cmd/compile/internal/syntax/parser.go
@@ -484,20 +484,6 @@ func (p *parser) funcDeclOrNil() *FuncDecl {
return nil
}
- // TODO(gri) check for regular functions only
- // if name.Sym.Name == "init" {
- // name = renameinit()
- // if params != nil || result != nil {
- // p.error("func init must have no arguments and no return values")
- // }
- // }
-
- // if localpkg.Name == "main" && name.Name == "main" {
- // if params != nil || result != nil {
- // p.error("func main must have no arguments and no return values")
- // }
- // }
-
f.Name = p.name()
f.Type = p.funcType()
if p.tok == _Lbrace {
@@ -506,14 +492,8 @@ func (p *parser) funcDeclOrNil() *FuncDecl {
checkBranches(f.Body, p.errh)
}
}
-
f.Pragma = p.pragma
- // TODO(gri) deal with function properties
- // if noescape && body != nil {
- // p.error("can only use //go:noescape with external func implementations")
- // }
-
return f
}
@@ -1709,9 +1689,6 @@ func (p *parser) forStmt() Stmt {
return s
}
-// TODO(gri) This function is now so heavily influenced by the keyword that
-// it may not make sense anymore to combine all three cases. It
-// may be simpler to just split it up for each statement kind.
func (p *parser) header(keyword token) (init SimpleStmt, cond Expr, post SimpleStmt) {
p.want(keyword)