Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for KeyValueExpr (0.98 sec)

  1. src/go/ast/ast.go

    		X     Expr        // left operand
    		OpPos token.Pos   // position of Op
    		Op    token.Token // operator
    		Y     Expr        // right operand
    	}
    
    	// A KeyValueExpr node represents (key : value) pairs
    	// in composite literals.
    	//
    	KeyValueExpr struct {
    		Key   Expr
    		Colon token.Pos // position of ":"
    		Value Expr
    	}
    )
    
    // The direction of a channel type is indicated by a bit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    		children = append(children,
    			tok(n.Lbrack, len("[")),
    			tok(n.Rbrack, len("]")))
    
    	case *ast.InterfaceType:
    		children = append(children,
    			tok(n.Interface, len("interface")))
    
    	case *ast.KeyValueExpr:
    		children = append(children,
    			tok(n.Colon, len(":")))
    
    	case *ast.LabeledStmt:
    		children = append(children,
    			tok(n.Colon, len(":")))
    
    	case *ast.MapType:
    		children = append(children,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  3. src/cmd/fix/typecheck.go

    						if kv, ok := e.(*ast.KeyValueExpr); ok {
    							if typeof[kv.Key] == "" {
    								typeof[kv.Key] = kt
    							}
    							if typeof[kv.Value] == "" {
    								typeof[kv.Value] = vt
    							}
    						}
    					}
    				}
    			}
    			if typ := cfg.Type[t]; typ != nil && len(typ.Field) > 0 { // struct
    				for _, e := range n.Elts {
    					if kv, ok := e.(*ast.KeyValueExpr); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 20.1K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    	}
    }
    
    // checkCopyLocksCompositeLit detects lock copy inside a composite literal
    func checkCopyLocksCompositeLit(pass *analysis.Pass, cl *ast.CompositeLit) {
    	for _, x := range cl.Elts {
    		if node, ok := x.(*ast.KeyValueExpr); ok {
    			x = node.Value
    		}
    		if path := lockPathRhs(pass, x); path != nil {
    			pass.ReportRangef(x, "literal copies lock value from %v: %v", analysisutil.Format(pass.Fset, x), path)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. src/go/types/index.go

    	visited := make(map[int64]bool, len(elts))
    	var index, max int64
    	for _, e := range elts {
    		// determine and check index
    		validIndex := false
    		eval := e
    		if kv, _ := e.(*ast.KeyValueExpr); kv != nil {
    			if typ, i := check.index(kv.Key, length); isValid(typ) {
    				if i >= 0 {
    					index = i
    					validIndex = true
    				} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/index.go

    	visited := make(map[int64]bool, len(elts))
    	var index, max int64
    	for _, e := range elts {
    		// determine and check index
    		validIndex := false
    		eval := e
    		if kv, _ := e.(*syntax.KeyValueExpr); kv != nil {
    			if typ, i := check.index(kv.Key, length); isValid(typ) {
    				if i >= 0 {
    					index = i
    					validIndex = true
    				} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  7. src/cmd/cgo/ast.go

    	case *ast.StarExpr:
    		f.walk(&n.X, context, visit)
    	case *ast.UnaryExpr:
    		f.walk(&n.X, ctxExpr, visit)
    	case *ast.BinaryExpr:
    		f.walk(&n.X, ctxExpr, visit)
    		f.walk(&n.Y, ctxExpr, visit)
    	case *ast.KeyValueExpr:
    		f.walk(&n.Key, ctxExpr, visit)
    		f.walk(&n.Value, ctxExpr, visit)
    
    	case *ast.ArrayType:
    		f.walk(&n.Len, ctxExpr, visit)
    		f.walk(&n.Elt, ctxType, visit)
    	case *ast.StructType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    	case *ast.StarExpr:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.UnaryExpr:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.BinaryExpr:
    		a.apply(n, "X", nil, n.X)
    		a.apply(n, "Y", nil, n.Y)
    
    	case *ast.KeyValueExpr:
    		a.apply(n, "Key", nil, n.Key)
    		a.apply(n, "Value", nil, n.Value)
    
    	// Types
    	case *ast.ArrayType:
    		a.apply(n, "Len", nil, n.Len)
    		a.apply(n, "Elt", nil, n.Elt)
    
    	case *ast.StructType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  9. src/go/ast/filter.go

    func filterExprList(list []Expr, filter Filter, export bool) []Expr {
    	j := 0
    	for _, exp := range list {
    		switch x := exp.(type) {
    		case *CompositeLit:
    			filterCompositeLit(x, filter, export)
    		case *KeyValueExpr:
    			if x, ok := x.Key.(*Ident); ok && !filter(x.Name) {
    				continue
    			}
    			if x, ok := x.Value.(*CompositeLit); ok {
    				filterCompositeLit(x, filter, export)
    			}
    		}
    		list[j] = exp
    		j++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. src/cmd/fix/fix.go

    		walkBeforeAfter(&n.X, before, after)
    	case *ast.UnaryExpr:
    		walkBeforeAfter(&n.X, before, after)
    	case *ast.BinaryExpr:
    		walkBeforeAfter(&n.X, before, after)
    		walkBeforeAfter(&n.Y, before, after)
    	case *ast.KeyValueExpr:
    		walkBeforeAfter(&n.Key, before, after)
    		walkBeforeAfter(&n.Value, before, after)
    
    	case *ast.ArrayType:
    		walkBeforeAfter(&n.Len, before, after)
    		walkBeforeAfter(&n.Elt, before, after)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 14.6K bytes
    - Viewed (0)
Back to top