Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 105 for SelectorExpr (0.2 sec)

  1. src/cmd/compile/internal/types2/check.go

    	var selOrIdent syntax.Expr
    	switch e := expr.(type) {
    	case *syntax.IndexExpr:
    		selOrIdent = e.X
    	case *syntax.SelectorExpr, *syntax.Name:
    		selOrIdent = e
    	}
    	switch x := selOrIdent.(type) {
    	case *syntax.Name:
    		return x
    	case *syntax.SelectorExpr:
    		return x.Sel
    	}
    	panic("instantiated ident not found")
    }
    
    func (check *Checker) recordDef(id *syntax.Name, obj Object) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    	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:
    		return 1 << nSendStmt
    	case *ast.SliceExpr:
    		return 1 << nSliceExpr
    	case *ast.StarExpr:
    		return 1 << nStarExpr
    	case *ast.StructType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/resolver_test.go

    			t.Errorf("package %s not imported", name)
    		}
    	}
    
    	// check that qualified identifiers are resolved
    	for _, f := range files {
    		syntax.Inspect(f, func(n syntax.Node) bool {
    			if s, ok := n.(*syntax.SelectorExpr); ok {
    				if x, ok := s.X.(*syntax.Name); ok {
    					obj := uses[x]
    					if obj == nil {
    						t.Errorf("%s: unresolved qualified identifier %s", x.Pos(), x.Value)
    						return false
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 10 12:59:20 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/ssa_test.go

    				continue
    			}
    			p := fd.Type.Params.List[0]
    			if len(p.Names) != 1 {
    				continue
    			}
    			s, ok := p.Type.(*ast.StarExpr)
    			if !ok {
    				continue
    			}
    			sel, ok := s.X.(*ast.SelectorExpr)
    			if !ok {
    				continue
    			}
    			base, ok := sel.X.(*ast.Ident)
    			if !ok {
    				continue
    			}
    			if base.Name != "testing" {
    				continue
    			}
    			if sel.Sel.Name != "T" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  5. src/go/printer/nodes.go

    	if x, ok := expr.(*ast.SelectorExpr); ok {
    		return p.selectorExpr(x, depth, true)
    	}
    	p.expr1(expr, prec1, depth)
    	return false
    }
    
    // selectorExpr handles an *ast.SelectorExpr node and reports whether x spans
    // multiple lines.
    func (p *printer) selectorExpr(x *ast.SelectorExpr, depth int, isMethod bool) bool {
    	p.expr1(x.X, token.HighestPrec, depth)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv/string.go

    		}
    		arg := call.Args[0]
    
    		// Retrieve target type name.
    		var tname *types.TypeName
    		switch fun := call.Fun.(type) {
    		case *ast.Ident:
    			tname, _ = pass.TypesInfo.Uses[fun].(*types.TypeName)
    		case *ast.SelectorExpr:
    			tname, _ = pass.TypesInfo.Uses[fun.Sel].(*types.TypeName)
    		}
    		if tname == nil {
    			return
    		}
    
    		// In the conversion T(v) of a value v of type V to a target type T, we
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    func TypeExpr(f *ast.File, pkg *types.Package, typ types.Type) ast.Expr {
    	switch t := typ.(type) {
    	case *types.Basic:
    		switch t.Kind() {
    		case types.UnsafePointer:
    			return &ast.SelectorExpr{X: ast.NewIdent("unsafe"), Sel: ast.NewIdent("Pointer")}
    		default:
    			return ast.NewIdent(t.Name())
    		}
    	case *types.Pointer:
    		x := TypeExpr(f, pkg, t.Elem())
    		if x == nil {
    			return nil
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/staticinit/sched.go

    		return nil, 0, false
    	}
    
    	switch n.Op() {
    	case ir.ONAME:
    		n := n.(*ir.Name)
    		return n, 0, true
    
    	case ir.OMETHEXPR:
    		n := n.(*ir.SelectorExpr)
    		return StaticLoc(n.FuncName())
    
    	case ir.ODOT:
    		n := n.(*ir.SelectorExpr)
    		if name, offset, ok = StaticLoc(n.X); !ok {
    			break
    		}
    		offset += n.Offset()
    		return name, offset, true
    
    	case ir.OINDEX:
    		n := n.(*ir.IndexExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/mkbuiltin.go

    		switch t.Name {
    		case "byte":
    			return "types.ByteType"
    		case "rune":
    			return "types.RuneType"
    		}
    		return fmt.Sprintf("types.Types[types.T%s]", strings.ToUpper(t.Name))
    	case *ast.SelectorExpr:
    		if t.X.(*ast.Ident).Name != "unsafe" || t.Sel.Name != "Pointer" {
    			log.Fatalf("unhandled type: %#v", t)
    		}
    		return "types.Types[types.TUNSAFEPTR]"
    
    	case *ast.ArrayType:
    		if t.Len == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:56:49 UTC 2023
    - 6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/struct.go

    		if base := ptrBase(e); base != nil {
    			// *T is valid, but **T is not
    			if op, _ := base.(*syntax.Operation); op == nil || ptrBase(op) == nil {
    				return embeddedFieldIdent(e.X)
    			}
    		}
    	case *syntax.SelectorExpr:
    		return e.Sel
    	case *syntax.IndexExpr:
    		return embeddedFieldIdent(e.X)
    	}
    	return nil // invalid embedded field
    }
    
    func (check *Checker) declareInSet(oset *objset, pos syntax.Pos, obj Object) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.6K bytes
    - Viewed (0)
Back to top