- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 29 for rangeStmt (0.28 sec)
-
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
case *ast.MapType: children = append(children, tok(n.Map, len("map"))) case *ast.ParenExpr: children = append(children, tok(n.Lparen, len("(")), tok(n.Rparen, len(")"))) case *ast.RangeStmt: children = append(children, tok(n.For, len("for")), tok(n.TokPos, len(n.Tok.String()))) case *ast.ReturnStmt: children = append(children, tok(n.Return, len("return")))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 15.9K bytes - Viewed (0) -
src/cmd/compile/internal/walk/stmt.go
case ir.OSELECT: n := n.(*ir.SelectStmt) walkSelect(n) return n case ir.OSWITCH: n := n.(*ir.SwitchStmt) walkSwitch(n) return n case ir.ORANGE: n := n.(*ir.RangeStmt) return walkRange(n) } // No return! Each case must return (or panic), // to avoid confusion about what gets returned // in the presence of type assertions. } func walkStmtList(s []ir.Node) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 06 15:42:30 UTC 2023 - 4.7K bytes - Viewed (0) -
src/go/types/stmt.go
check.use(s.Lhs...) // avoid follow-up errors } check.stmt(inner, s.Body) case *ast.RangeStmt: inner |= breakOk | continueOk check.rangeStmt(inner, s) default: check.error(s, InvalidSyntaxTree, "invalid statement") } } func (check *Checker) rangeStmt(inner stmtContext, s *ast.RangeStmt) { // Convert go/ast form to local variables. type Expr = ast.Expr type identType = ast.Ident
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.6K bytes - Viewed (0) -
src/cmd/compile/internal/reflectdata/helpers.go
} // RangeMapRType asserts that n is a "range" loop over a map value, // and returns an expression that yields the *runtime._type value // representing that map type. func RangeMapRType(pos src.XPos, n *ir.RangeStmt) ir.Node { assertOp(n, ir.ORANGE) if hasRType(n, n.RType, "RType") { return n.RType } return mapRType(pos, n.X.Type()) } // UnsafeSliceElemRType asserts that n is an "unsafe.Slice" operation,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 04:50:32 UTC 2023 - 7.1K bytes - Viewed (0) -
src/go/ast/walk.go
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: if n.Key != nil { Walk(v, n.Key) } if n.Value != nil { Walk(v, n.Value) } Walk(v, n.X) Walk(v, n.Body) // Declarations case *ImportSpec: if n.Doc != nil {
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/compile/internal/typecheck/stmt.go
"cmd/internal/src" "internal/types/errors" ) func RangeExprType(t *types.Type) *types.Type { if t.IsPtr() && t.Elem().IsArray() { return t.Elem() } return t } func typecheckrangeExpr(n *ir.RangeStmt) { } // type check assignment. // if this assignment is the definition of a var on the left side, // fill in the var's type. func tcAssign(n *ir.AssignStmt) { if base.EnableTrace && base.Flag.LowerT {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:10:54 UTC 2023 - 17.8K bytes - Viewed (0) -
src/cmd/cover/cover.go
if found { return pos } found, pos = hasFuncLiteral(s.Post) if found { return pos } return s.Body.Lbrace case *ast.LabeledStmt: return f.statementBoundary(s.Stmt) case *ast.RangeStmt: found, pos := hasFuncLiteral(s.X) if found { return pos } return s.Body.Lbrace case *ast.SwitchStmt: found, pos := hasFuncLiteral(s.Init) if found { return pos }
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/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go
a.apply(n, "Body", nil, n.Body) case *ast.ForStmt: a.apply(n, "Init", nil, n.Init) a.apply(n, "Cond", nil, n.Cond) a.apply(n, "Post", nil, n.Post) a.apply(n, "Body", nil, n.Body) case *ast.RangeStmt: a.apply(n, "Key", nil, n.Key) a.apply(n, "Value", nil, n.Value) a.apply(n, "X", nil, n.X) a.apply(n, "Body", nil, n.Body) // Declarations case *ast.ImportSpec: a.apply(n, "Doc", nil, n.Doc)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 12.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stmt.go
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") defer check.closeScope() check.simpleStmt(s.Init) if s.Cond != nil { var x operand check.expr(nil, &x, s.Cond)
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/go/types/api.go
// *ast.TypeSpec // *ast.BlockStmt // *ast.IfStmt // *ast.SwitchStmt // *ast.TypeSwitchStmt // *ast.CaseClause // *ast.CommClause // *ast.ForStmt // *ast.RangeStmt // Scopes map[ast.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: Wed May 15 19:57:43 UTC 2024 - 17.2K bytes - Viewed (0)