Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for rangeStmt (0.2 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    		(*ast.CallExpr)(nil),
    		(*ast.CompositeLit)(nil),
    		(*ast.FuncDecl)(nil),
    		(*ast.FuncLit)(nil),
    		(*ast.GenDecl)(nil),
    		(*ast.RangeStmt)(nil),
    		(*ast.ReturnStmt)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(node ast.Node) {
    		switch node := node.(type) {
    		case *ast.RangeStmt:
    			checkCopyLocksRange(pass, node)
    		case *ast.FuncDecl:
    			checkCopyLocksFunc(pass, node.Name.Name, node.Recv, node.Type)
    		case *ast.FuncLit:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
Back to top