Home | History | Annotate | Download | only in types

Lines Matching defs:block

27 			msg = "goto %s jumps into block"
43 // A block tracks label declarations in a block and its enclosing blocks.
44 type block struct {
45 parent *block // enclosing block
46 lstmt *ast.LabeledStmt // labeled statement to which this block belongs, or nil
50 // insert records a new label declaration for the current block.
51 // The label must not have been declared before in any block.
52 func (b *block) insert(s *ast.LabeledStmt) {
66 // or an enclosing block with the given label name, or nil.
67 func (b *block) gotoTarget(name string) *ast.LabeledStmt {
78 func (b *block) enclosingTarget(name string) *ast.LabeledStmt {
87 // blockBranches processes a block's statement list and returns the set of outgoing forward jumps.
89 // enclosing block, and lstmt is the labeled statement this block is associated with (or nil).
90 func (check *Checker) blockBranches(all *Scope, parent *block, lstmt *ast.LabeledStmt, list []ast.Stmt) []*ast.BranchStmt {
91 b := &block{parent: parent, lstmt: lstmt}
99 // invalid (they may still jump out of the block and be ok).
118 // Unresolved forward jumps inside the nested block
119 // become forward jumps in the current block.