Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 56 for IndexExpr (0.12 sec)

  1. src/go/doc/reader.go

    func recvString(recv ast.Expr) string {
    	switch t := recv.(type) {
    	case *ast.Ident:
    		return t.Name
    	case *ast.StarExpr:
    		return "*" + recvString(t.X)
    	case *ast.IndexExpr:
    		// Generic type with one parameter.
    		return fmt.Sprintf("%s[%s]", recvString(t.X), recvParam(t.Index))
    	case *ast.IndexListExpr:
    		// Generic type with multiple parameters.
    		if len(t.Indices) > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  2. src/cmd/cgo/ast.go

    		f.walk(&n.Type, ctxType, visit)
    		f.walk(n.Elts, ctxExpr, visit)
    	case *ast.ParenExpr:
    		f.walk(&n.X, context, visit)
    	case *ast.SelectorExpr:
    		f.walk(&n.X, ctxSelector, visit)
    	case *ast.IndexExpr:
    		f.walk(&n.X, ctxExpr, visit)
    		f.walk(&n.Index, ctxExpr, visit)
    	case *ast.SliceExpr:
    		f.walk(&n.X, ctxExpr, visit)
    		if n.Low != nil {
    			f.walk(&n.Low, ctxExpr, visit)
    		}
    		if n.High != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    		a.applyList(n, "Elts")
    
    	case *ast.ParenExpr:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.SelectorExpr:
    		a.apply(n, "X", nil, n.X)
    		a.apply(n, "Sel", nil, n.Sel)
    
    	case *ast.IndexExpr:
    		a.apply(n, "X", nil, n.X)
    		a.apply(n, "Index", nil, n.Index)
    
    	case *ast.IndexListExpr:
    		a.apply(n, "X", nil, n.X)
    		a.applyList(n, "Indices")
    
    	case *ast.SliceExpr:
    		a.apply(n, "X", nil, n.X)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  4. src/go/types/expr.go

    		kind := check.rawExpr(nil, x, e.X, nil, false)
    		x.expr = e
    		return kind
    
    	case *ast.SelectorExpr:
    		check.selector(x, e, nil, false)
    
    	case *ast.IndexExpr, *ast.IndexListExpr:
    		ix := typeparams.UnpackIndexExpr(e)
    		if check.indexExpr(x, ix) {
    			if !enableReverseTypeInference {
    				T = nil
    			}
    			check.funcInst(T, e.Pos(), x, ix, true)
    		}
    		if x.mode == invalid {
    			goto Error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  5. src/cmd/fix/fix.go

    		walkBeforeAfter(&n.Elts, before, after)
    	case *ast.ParenExpr:
    		walkBeforeAfter(&n.X, before, after)
    	case *ast.SelectorExpr:
    		walkBeforeAfter(&n.X, before, after)
    	case *ast.IndexExpr:
    		walkBeforeAfter(&n.X, before, after)
    		walkBeforeAfter(&n.Index, before, after)
    	case *ast.IndexListExpr:
    		walkBeforeAfter(&n.X, before, after)
    		walkBeforeAfter(&n.Indices, before, after)
    	case *ast.SliceExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 14.6K bytes
    - Viewed (0)
  6. src/go/parser/parser.go

    		}
    		p.next()
    	}
    	p.exprLev--
    
    	closing := p.expectClosing(token.RBRACK, "type argument list")
    
    	if len(list) == 0 {
    		p.errorExpected(closing, "type argument list")
    		return &ast.IndexExpr{
    			X:      typ,
    			Lbrack: opening,
    			Index:  &ast.BadExpr{From: opening + 1, To: closing},
    			Rbrack: closing,
    		}
    	}
    
    	return typeparams.PackIndexExpr(typ, opening, list, closing)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/typexpr.go

    			// ignore - error reported before
    		case novalue:
    			check.errorf(&x, NotAType, "%s used as type", &x)
    		default:
    			check.errorf(&x, NotAType, "%s is not a type", &x)
    		}
    
    	case *syntax.IndexExpr:
    		check.verifyVersionf(e, go1_18, "type instantiation")
    		return check.instantiatedType(e.X, syntax.UnpackListExpr(e.Index), def)
    
    	case *syntax.ParenExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. src/go/parser/resolver.go

    	if ptr, ok := typ.(*ast.StarExpr); ok {
    		typ = ptr.X
    	}
    
    	var declareExprs []ast.Expr // exprs to declare
    	var resolveExprs []ast.Expr // exprs to resolve
    	switch typ := typ.(type) {
    	case *ast.IndexExpr:
    		declareExprs = []ast.Expr{typ.Index}
    		resolveExprs = append(resolveExprs, typ.X)
    	case *ast.IndexListExpr:
    		declareExprs = typ.Indices
    		resolveExprs = append(resolveExprs, typ.X)
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 12:56:53 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/expr.go

    		kind := check.rawExpr(nil, x, e.X, nil, false)
    		x.expr = e
    		return kind
    
    	case *syntax.SelectorExpr:
    		check.selector(x, e, nil, false)
    
    	case *syntax.IndexExpr:
    		if check.indexExpr(x, e) {
    			if !enableReverseTypeInference {
    				T = nil
    			}
    			check.funcInst(T, e.Pos(), x, e, true)
    		}
    		if x.mode == invalid {
    			goto Error
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/range.go

    	}
    
    	stmt1 := loop.Body[0] // only stmt in body
    	if stmt1.Op() != ir.OAS {
    		return nil
    	}
    	stmt := stmt1.(*ir.AssignStmt)
    	if stmt.X.Op() != ir.OINDEX {
    		return nil
    	}
    	lhs := stmt.X.(*ir.IndexExpr)
    	x := lhs.X
    	if a.Type().IsPtr() && a.Type().Elem().IsArray() {
    		if s, ok := x.(*ir.StarExpr); ok && s.Op() == ir.ODEREF {
    			x = s.X
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
Back to top