Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 47 for funcList (0.24 sec)

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

    }
    
    // litStmts returns all statements from the function body of a function
    // literal.
    //
    // If fun is not a function literal, it returns nil.
    func litStmts(fun ast.Expr) []ast.Stmt {
    	lit, _ := fun.(*ast.FuncLit)
    	if lit == nil {
    		return nil
    	}
    	return lit.Body.List
    }
    
    // goInvoke returns a function expression that would be called asynchronously
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    	case *ast.FieldList:
    		return 1 << nFieldList
    	case *ast.File:
    		return 1 << nFile
    	case *ast.ForStmt:
    		return 1 << nForStmt
    	case *ast.FuncDecl:
    		return 1 << nFuncDecl
    	case *ast.FuncLit:
    		return 1 << nFuncLit
    	case *ast.FuncType:
    		return 1 << nFuncType
    	case *ast.GenDecl:
    		return 1 << nGenDecl
    	case *ast.GoStmt:
    		return 1 << nGoStmt
    	case *ast.Ident:
    		return 1 << nIdent
    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/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    		}
    		if n.Type.Results != nil {
    			children = append(children, n.Type.Results)
    		}
    		if n.Body != nil {
    			children = append(children, n.Body)
    		}
    
    	case *ast.FuncLit:
    		// nop
    
    	case *ast.FuncType:
    		if n.Func != 0 {
    			children = append(children,
    				tok(n.Func, len("func")))
    		}
    
    	case *ast.GenDecl:
    		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)
  4. src/cmd/compile/internal/syntax/walk.go

    	case *CompositeLit:
    		if n.Type != nil {
    			w.node(n.Type)
    		}
    		w.exprList(n.ElemList)
    
    	case *KeyValueExpr:
    		w.node(n.Key)
    		w.node(n.Value)
    
    	case *FuncLit:
    		w.node(n.Type)
    		w.node(n.Body)
    
    	case *ParenExpr:
    		w.node(n.X)
    
    	case *SelectorExpr:
    		w.node(n.X)
    		w.node(n.Sel)
    
    	case *IndexExpr:
    		w.node(n.X)
    		w.node(n.Index)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:55:04 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. src/go/ast/walk.go

    		}
    
    	case *FieldList:
    		walkList(v, n.List)
    
    	// Expressions
    	case *BadExpr, *Ident, *BasicLit:
    		// nothing to do
    
    	case *Ellipsis:
    		if n.Elt != nil {
    			Walk(v, n.Elt)
    		}
    
    	case *FuncLit:
    		Walk(v, n.Type)
    		Walk(v, n.Body)
    
    	case *CompositeLit:
    		if n.Type != nil {
    			Walk(v, n.Type)
    		}
    		walkList(v, n.Elts)
    
    	case *ParenExpr:
    		Walk(v, n.X)
    
    	case *SelectorExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/nodes.go

    		NKeys    int // number of elements with keys
    		Rbrace   Pos
    		expr
    	}
    
    	// Key: Value
    	KeyValueExpr struct {
    		Key, Value Expr
    		expr
    	}
    
    	// func Type { Body }
    	FuncLit struct {
    		Type *FuncType
    		Body *BlockStmt
    		expr
    	}
    
    	// (X)
    	ParenExpr struct {
    		X Expr
    		expr
    	}
    
    	// X.Sel
    	SelectorExpr struct {
    		X   Expr
    		Sel *Name
    		expr
    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/types/expr.go

    	switch t := x.typ.(type) {
    	case *Alias, *Named:
    		if isGeneric(t) {
    			what = "type"
    		}
    	case *Signature:
    		if t.tparams != nil {
    			if enableReverseTypeInference && T != nil {
    				check.funcInst(T, x.Pos(), x, nil, true)
    				return
    			}
    			what = "function"
    		}
    	}
    	if what != "" {
    		check.errorf(x.expr, WrongTypeArgCount, "cannot use generic %s %s without instantiation", what, x.expr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/syntax/nodes_test.go

    	{"BasicLit", "@`abc`"},
    
    	{"CompositeLit", `@{}`},
    	{"CompositeLit", `T@{}`},
    	{"CompositeLit", `struct{x, y int}@{}`},
    
    	{"KeyValueExpr", `"foo"@: true`},
    	{"KeyValueExpr", `"a"@: b`},
    
    	{"FuncLit", `@func (){}`},
    	{"ParenExpr", `@(x)`},
    	{"SelectorExpr", `a@.b`},
    	{"IndexExpr", `a@[i]`},
    
    	{"SliceExpr", `a@[:]`},
    	{"SliceExpr", `a@[i:]`},
    	{"SliceExpr", `a@[:j]`},
    	{"SliceExpr", `a@[i:j]`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 18:45:06 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/expr.go

    	switch t := x.typ.(type) {
    	case *Alias, *Named:
    		if isGeneric(t) {
    			what = "type"
    		}
    	case *Signature:
    		if t.tparams != nil {
    			if enableReverseTypeInference && T != nil {
    				check.funcInst(T, x.Pos(), x, nil, true)
    				return
    			}
    			what = "function"
    		}
    	}
    	if what != "" {
    		check.errorf(x.expr, WrongTypeArgCount, "cannot use generic %s %s without instantiation", what, x.expr)
    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/fix/typecheck.go

    	// the curfn stack.
    	var curfn []*ast.FuncType
    
    	before := func(n any) {
    		// push function type on stack
    		switch n := n.(type) {
    		case *ast.FuncDecl:
    			curfn = append(curfn, n.Type)
    		case *ast.FuncLit:
    			curfn = append(curfn, n.Type)
    		}
    	}
    
    	// After is the real type checker.
    	after := func(n any) {
    		if n == nil {
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 20.1K bytes
    - Viewed (0)
Back to top