- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for RangeStmt (0.12 sec)
-
src/go/printer/testdata/parser.go
} if rhs, isUnary := as.Rhs[0].(*ast.UnaryExpr); isUnary && rhs.Op == token.RANGE { // rhs is range expression // (any short variable declaration was handled by parseSimpleStat above) return &ast.RangeStmt{pos, key, value, as.TokPos, as.Tok, rhs.X, body} } p.errorExpected(s2.Pos(), "range clause") return &ast.BadStmt{pos, body.End()} } // regular for statement
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.5K bytes - Viewed (0) -
src/go/printer/nodes.go
p.print(token.RBRACE) } else { p.block(body, 0) } case *ast.ForStmt: p.print(token.FOR) p.controlClause(true, s.Init, s.Cond, s.Post) p.block(s.Body, 1) case *ast.RangeStmt: p.print(token.FOR, blank) if s.Key != nil { p.expr(s.Key) if s.Value != nil { // use position of value following the comma as // comma position for correct comment placement
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/go/parser/parser.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0) -
src/go/types/api_test.go
case *ast.TypeSwitchStmt: kind = "type switch" case *ast.CaseClause: kind = "case" case *ast.CommClause: kind = "comm" case *ast.ForStmt: kind = "for" case *ast.RangeStmt: kind = "range" } // look for matching scope description desc := kind + ":" + strings.Join(scope.Names(), " ") found := false for _, d := range test.scopes { if desc == d {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 94.2K bytes - Viewed (0)