- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for forStmt (0.13 sec)
-
src/cmd/compile/internal/types2/labels.go
// whose execution terminates." valid := false if t := b.enclosingTarget(name); t != nil { switch t.Stmt.(type) { case *syntax.SwitchStmt, *syntax.SelectStmt, *syntax.ForStmt: valid = true } } if !valid { check.errorf(s.Label, MisplacedLabel, "invalid break label %s", name) return } case syntax.Continue:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 7.2K bytes - Viewed (0) -
src/go/types/labels.go
// whose execution terminates." valid := false if t := b.enclosingTarget(name); t != nil { switch t.Stmt.(type) { case *ast.SwitchStmt, *ast.TypeSwitchStmt, *ast.SelectStmt, *ast.ForStmt, *ast.RangeStmt: valid = true } } if !valid { check.errorf(s.Label, MisplacedLabel, "invalid break label %s", name) return } case token.CONTINUE:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 7.2K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/positions.go
// case *ExprStmt: case *SendStmt: m = n.Chan // case *DeclStmt: case *AssignStmt: m = n.Lhs // case *BranchStmt: // case *CallStmt: // case *ReturnStmt: // case *IfStmt: // case *ForStmt: // case *SwitchStmt: // case *SelectStmt: // helper nodes case *RangeClause: if n.Lhs != nil { m = n.Lhs continue } m = n.X // case *CaseClause:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 17:49:19 UTC 2024 - 6.5K bytes - Viewed (0) -
src/cmd/compile/internal/rangefunc/rewrite.go
} return r.useObj(r.nextVar) } // forRangeFunc checks whether n is a range-over-func. // If so, it returns n.(*syntax.ForStmt), true. // Otherwise it returns nil, false. func forRangeFunc(n syntax.Node) (*syntax.ForStmt, bool) { nfor, ok := n.(*syntax.ForStmt) if !ok { return nil, false } nrange, ok := nfor.Init.(*syntax.RangeClause) if !ok { return nil, false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0) -
src/go/ast/walk.go
} Walk(v, n.Assign) Walk(v, n.Body) case *CommClause: if n.Comm != nil { Walk(v, n.Comm) } walkList(v, n.Body) case *SelectStmt: Walk(v, n.Body) case *ForStmt: if n.Init != nil { Walk(v, n.Init) } if n.Cond != nil { Walk(v, n.Cond) } if n.Post != nil { Walk(v, n.Post) } Walk(v, n.Body) case *RangeStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K bytes - Viewed (0) -
src/cmd/cover/cover.go
case *ast.IfStmt: found, pos := hasFuncLiteral(s.Init) if found { return pos } found, pos = hasFuncLiteral(s.Cond) if found { return pos } return s.Body.Lbrace case *ast.ForStmt: found, pos := hasFuncLiteral(s.Init) if found { return pos } found, pos = hasFuncLiteral(s.Cond) if found { return pos } found, pos = hasFuncLiteral(s.Post) if found {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 34.5K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
s := new(DeclStmt) s.pos = p.pos() p.next() // _Const, _Type, or _Var s.DeclList = p.appendGroup(nil, f) return s } func (p *parser) forStmt() Stmt { if trace { defer p.trace("forStmt")() } s := new(ForStmt) s.pos = p.pos() s.Init, s.Cond, s.Post = p.header(_For) s.Body = p.blockStmt("for clause") return s }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go
// Check if the enclosing statement is inside another node. switch expr := path[enclosingIndex+1].(type) { case *ast.IfStmt: // Get the base if statement. return baseIfStmt(path, enclosingIndex+1) case *ast.ForStmt: if expr.Init == enclosingStmt || expr.Post == enclosingStmt { return expr } } return enclosingStmt.(ast.Stmt) } // baseIfStmt walks up the if/else-if chain until we get to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 11.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stmt.go
} check.openScopeUntil(clause, end, "case") if clause.Comm != nil { check.stmt(inner, clause.Comm) } check.stmtList(inner, clause.Body) check.closeScope() } case *syntax.ForStmt: inner |= breakOk | continueOk if rclause, _ := s.Init.(*syntax.RangeClause); rclause != nil { check.rangeStmt(inner, s, rclause) break } check.openScope(s, "for")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/api.go
// *syntax.FuncType // *syntax.TypeDecl // *syntax.BlockStmt // *syntax.IfStmt // *syntax.SwitchStmt // *syntax.CaseClause // *syntax.CommClause // *syntax.ForStmt // Scopes map[syntax.Node]*Scope // InitOrder is the list of package-level initializers in the order in which // they must be executed. Initializers referring to variables related by an
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 13:48:53 UTC 2024 - 17.4K bytes - Viewed (0)