Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 103 for callExpr (0.21 sec)

  1. src/go/ast/walk.go

    		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:
    		Walk(v, n.X)
    
    	case *BinaryExpr:
    		Walk(v, n.X)
    		Walk(v, n.Y)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/walk.go

    		w.node(n.Type)
    
    	case *TypeSwitchGuard:
    		if n.Lhs != nil {
    			w.node(n.Lhs)
    		}
    		w.node(n.X)
    
    	case *Operation:
    		w.node(n.X)
    		if n.Y != nil {
    			w.node(n.Y)
    		}
    
    	case *CallExpr:
    		w.node(n.Fun)
    		w.exprList(n.ArgList)
    
    	case *ListExpr:
    		w.exprList(n.ElemList)
    
    	// types
    	case *ArrayType:
    		if n.Len != nil {
    			w.node(n.Len)
    		}
    		w.node(n.Elem)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:55:04 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  3. src/go/parser/parser_test.go

    	{name: "recv", format: "package main; var x = «<-»x"},
    	{name: "call", format: "package main; var x = «f(«1»)»", parseMultiplier: 2},    // Parser nodes: Ident, CallExpr
    	{name: "conv", format: "package main; var x = «(*T)(«1»)»", parseMultiplier: 2}, // Parser nodes: ParenExpr, CallExpr
    	{name: "label", format: "package main; func main() { «Label:» }"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go

    			// identifying dead code, continue redirects control flow just
    			// like the other terminating statements.
    			d.reachable = false
    		}
    
    	case *ast.ExprStmt:
    		// Call to panic?
    		call, ok := x.X.(*ast.CallExpr)
    		if ok {
    			name, ok := call.Fun.(*ast.Ident)
    			if ok && name.Name == "panic" && name.Obj == nil {
    				d.reachable = false
    			}
    		}
    
    	case *ast.ForStmt:
    		d.findDead(x.Body)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go

    		}
    	}
    }
    
    // callMayReturn reports whether the called function may return.
    // It is passed to the CFG builder.
    func (c *CFGs) callMayReturn(call *ast.CallExpr) (r bool) {
    	if id, ok := call.Fun.(*ast.Ident); ok && c.pass.TypesInfo.Uses[id] == panicBuiltin {
    		return false // panic never returns
    	}
    
    	// Is this a static call? Also includes static functions
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/nodes.go

    		X   Expr  // X.(type)
    		expr
    	}
    
    	Operation struct {
    		Op   Operator
    		X, Y Expr // Y == nil means unary expression
    		expr
    	}
    
    	// Fun(ArgList[0], ArgList[1], ...)
    	CallExpr struct {
    		Fun     Expr
    		ArgList []Expr // nil means no arguments
    		HasDots bool   // last argument is followed by ...
    		expr
    	}
    
    	// ElemList[0], ElemList[1], ...
    	ListExpr struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:38 UTC 2023
    - 9K bytes
    - Viewed (0)
  7. src/go/printer/testdata/parser.go

    		p.next() // consume "++" or "--"
    		return s
    	}
    
    	// expression
    	return &ast.ExprStmt{x[0]}
    }
    
    func (p *parser) parseCallExpr() *ast.CallExpr {
    	x := p.parseRhs()
    	if call, isCall := x.(*ast.CallExpr); isCall {
    		return call
    	}
    	p.errorExpected(x.Pos(), "function/method call")
    	return nil
    }
    
    func (p *parser) parseGoStmt() ast.Stmt {
    	if p.trace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/call.go

    		} else {
    			check.mono.recordInstance(check.pkg, pos, tparams, targs, xlist)
    		}
    	}).describef(pos, "verify instantiation")
    
    	return inst
    }
    
    func (check *Checker) callExpr(x *operand, call *syntax.CallExpr) exprKind {
    	var inst *syntax.IndexExpr // function instantiation, if any
    	if iexpr, _ := call.Fun.(*syntax.IndexExpr); iexpr != nil {
    		if check.indexExpr(x, iexpr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  9. src/go/types/call.go

    		} else {
    			check.mono.recordInstance(check.pkg, pos, tparams, targs, xlist)
    		}
    	}).describef(atPos(pos), "verify instantiation")
    
    	return inst
    }
    
    func (check *Checker) callExpr(x *operand, call *ast.CallExpr) exprKind {
    	ix := typeparams.UnpackIndexExpr(call.Fun)
    	if ix != nil {
    		if check.indexExpr(x, ix) {
    			// Delay function instantiation to argument checking,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/builtins_test.go

    	// find called function
    	n := 0
    	var fun syntax.Expr
    	for x := range types {
    		if call, _ := x.(*syntax.CallExpr); call != nil {
    			fun = call.Fun
    			n++
    		}
    	}
    	if n != 1 {
    		t.Errorf("%s: got %d CallExprs; want 1", src0, n)
    		return
    	}
    
    	// check recorded types for fun and descendents (may be parenthesized)
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 18:06:31 UTC 2024
    - 10.8K bytes
    - Viewed (0)
Back to top