Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for rangeStmt (0.15 sec)

  1. src/go/types/return.go

    	switch s := s.(type) {
    	default:
    		panic("unreachable")
    
    	case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.SendStmt,
    		*ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt, *ast.DeferStmt,
    		*ast.RangeStmt:
    		// no chance
    
    	case *ast.LabeledStmt:
    		return check.isTerminating(s.Stmt, s.Label.Name)
    
    	case *ast.ExprStmt:
    		// calling the predeclared (possibly parenthesized) panic() function is terminating
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. 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)
  3. src/cmd/vendor/golang.org/x/tools/go/cfg/cfg.go

    	KindIfThen          // then block of IfStmt
    	KindLabel           // labeled block of BranchStmt (Stmt may be nil for dangling label)
    	KindRangeBody       // body of RangeStmt
    	KindRangeDone       // block after RangeStmt
    	KindRangeLoop       // head of RangeStmt
    	KindSelectCaseBody  // body of SelectStmt
    	KindSelectDone      // block after SelectStmt
    	KindSelectAfterCase // block after a CommClause
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    		return 1 << nLabeledStmt
    	case *ast.MapType:
    		return 1 << nMapType
    	case *ast.Package:
    		return 1 << nPackage
    	case *ast.ParenExpr:
    		return 1 << nParenExpr
    	case *ast.RangeStmt:
    		return 1 << nRangeStmt
    	case *ast.ReturnStmt:
    		return 1 << nReturnStmt
    	case *ast.SelectStmt:
    		return 1 << nSelectStmt
    	case *ast.SelectorExpr:
    		return 1 << nSelectorExpr
    	case *ast.SendStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
Back to top