Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for TypeAssertExpr (0.25 sec)

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

    	nodeFilter := []ast.Node{
    		(*ast.TypeAssertExpr)(nil),
    		(*ast.TypeSwitchStmt)(nil),
    	}
    	var free typeparams.Free
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		var (
    			assert  *ast.TypeAssertExpr // v.(T) expression
    			targets []ast.Expr          // interfaces T in v.(T)
    		)
    		switch n := n.(type) {
    		case *ast.TypeAssertExpr:
    			// take care of v.(type) in *ast.TypeSwitchStmt
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  2. src/go/types/exprstring.go

    		if x.High != nil {
    			WriteExpr(buf, x.High)
    		}
    		if x.Slice3 {
    			buf.WriteByte(':')
    			if x.Max != nil {
    				WriteExpr(buf, x.Max)
    			}
    		}
    		buf.WriteByte(']')
    
    	case *ast.TypeAssertExpr:
    		WriteExpr(buf, x.X)
    		buf.WriteString(".(")
    		WriteExpr(buf, x.Type)
    		buf.WriteByte(')')
    
    	case *ast.CallExpr:
    		WriteExpr(buf, x.Fun)
    		buf.WriteByte('(')
    		writeExprList(buf, x.Args)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 19:31:44 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    	case *ast.SliceExpr:
    		return 1 << nSliceExpr
    	case *ast.StarExpr:
    		return 1 << nStarExpr
    	case *ast.StructType:
    		return 1 << nStructType
    	case *ast.SwitchStmt:
    		return 1 << nSwitchStmt
    	case *ast.TypeAssertExpr:
    		return 1 << nTypeAssertExpr
    	case *ast.TypeSpec:
    		return 1 << nTypeSpec
    	case *ast.TypeSwitchStmt:
    		return 1 << nTypeSwitchStmt
    	case *ast.UnaryExpr:
    		return 1 << nUnaryExpr
    	case *ast.ValueSpec:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  4. src/go/ast/ast.go

    		Max    Expr      // maximum capacity of slice; or nil
    		Slice3 bool      // true if 3-index slice (2 colons present)
    		Rbrack token.Pos // position of "]"
    	}
    
    	// A TypeAssertExpr node represents an expression followed by a
    	// type assertion.
    	//
    	TypeAssertExpr struct {
    		X      Expr      // expression
    		Lparen token.Pos // position of "("
    		Type   Expr      // asserted type; nil means type switch X.(type)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    	case *ast.StructType:
    		children = append(children, tok(n.Struct, len("struct")))
    
    	case *ast.SwitchStmt:
    		children = append(children, tok(n.Switch, len("switch")))
    
    	case *ast.TypeAssertExpr:
    		children = append(children,
    			tok(n.Lparen-1, len(".")),
    			tok(n.Lparen, len("(")),
    			tok(n.Rparen, len(")")))
    
    	case *ast.TypeSpec:
    		// TODO(adonovan): TypeSpec.{Doc,Comment}?
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  6. src/go/ast/walk.go

    	case *SliceExpr:
    		Walk(v, n.X)
    		if n.Low != nil {
    			Walk(v, n.Low)
    		}
    		if n.High != nil {
    			Walk(v, n.High)
    		}
    		if n.Max != nil {
    			Walk(v, n.Max)
    		}
    
    	case *TypeAssertExpr:
    		Walk(v, n.X)
    		if n.Type != nil {
    			Walk(v, n.Type)
    		}
    
    	case *CallExpr:
    		Walk(v, n.Fun)
    		walkList(v, n.Args)
    
    	case *StarExpr:
    		Walk(v, n.X)
    
    	case *UnaryExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  7. src/cmd/fix/fix.go

    		walkBeforeAfter(&n.X, before, after)
    		if n.Low != nil {
    			walkBeforeAfter(&n.Low, before, after)
    		}
    		if n.High != nil {
    			walkBeforeAfter(&n.High, before, after)
    		}
    	case *ast.TypeAssertExpr:
    		walkBeforeAfter(&n.X, before, after)
    		walkBeforeAfter(&n.Type, before, after)
    	case *ast.CallExpr:
    		walkBeforeAfter(&n.Fun, before, after)
    		walkBeforeAfter(&n.Args, before, after)
    	case *ast.StarExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 14.6K bytes
    - Viewed (0)
  8. src/cmd/cgo/ast.go

    		if n.Low != nil {
    			f.walk(&n.Low, ctxExpr, visit)
    		}
    		if n.High != nil {
    			f.walk(&n.High, ctxExpr, visit)
    		}
    		if n.Max != nil {
    			f.walk(&n.Max, ctxExpr, visit)
    		}
    	case *ast.TypeAssertExpr:
    		f.walk(&n.X, ctxExpr, visit)
    		f.walk(&n.Type, ctxType, visit)
    	case *ast.CallExpr:
    		if context == ctxAssign2 {
    			f.walk(&n.Fun, ctxCall2, visit)
    		} else {
    			f.walk(&n.Fun, ctxCall, visit)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    		a.applyList(n, "Indices")
    
    	case *ast.SliceExpr:
    		a.apply(n, "X", nil, n.X)
    		a.apply(n, "Low", nil, n.Low)
    		a.apply(n, "High", nil, n.High)
    		a.apply(n, "Max", nil, n.Max)
    
    	case *ast.TypeAssertExpr:
    		a.apply(n, "X", nil, n.X)
    		a.apply(n, "Type", nil, n.Type)
    
    	case *ast.CallExpr:
    		a.apply(n, "Fun", nil, n.Fun)
    		a.applyList(n, "Args")
    
    	case *ast.StarExpr:
    		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)
  10. src/cmd/compile/internal/walk/expr.go

    		n := n.(*ir.UnaryExpr)
    		return walkUnsafeData(n, init)
    
    	case ir.ODOT, ir.ODOTPTR:
    		n := n.(*ir.SelectorExpr)
    		return walkDot(n, init)
    
    	case ir.ODOTTYPE, ir.ODOTTYPE2:
    		n := n.(*ir.TypeAssertExpr)
    		return walkDotType(n, init)
    
    	case ir.ODYNAMICDOTTYPE, ir.ODYNAMICDOTTYPE2:
    		n := n.(*ir.DynamicTypeAssertExpr)
    		return walkDynamicDotType(n, init)
    
    	case ir.OLEN, ir.OCAP:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top