Change-Id: Ib55f7ea3f7dcd9d02f6027121663870a65cb886c
Reviewed-on: https://go-review.googlesource.com/39924
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
func (p *noder) labeledStmt(label *syntax.LabeledStmt) *Node {
lhs := p.nod(label, OLABEL, p.newname(label.Label), nil)
- lhs.Sym = types.Dclstack
+ lhs.Sym = types.Dclstack // context, for goto restriction
var ls *Node
if label.Stmt != nil { // TODO(mdempsky): Should always be present.
// Pushdcl pushes the current declaration for symbol s (if any) so that
// it can be shadowed by a new declaration within a nested block scope.
-func Pushdcl(s *Sym, pos src.XPos) *Sym {
+func Pushdcl(s *Sym, pos src.XPos) {
d := push(pos)
dcopy(d, s)
- return d
}
// Popdcl pops the innermost block scope and restores all symbol declarations