Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for FuncLit (0.13 sec)

  1. src/cmd/compile/internal/syntax/positions.go

    		// case *BadExpr:
    		// case *Name:
    		// case *BasicLit:
    		case *CompositeLit:
    			if n.Type != nil {
    				m = n.Type
    				continue
    			}
    			return n.Pos()
    		case *KeyValueExpr:
    			m = n.Key
    		// case *FuncLit:
    		// case *ParenExpr:
    		case *SelectorExpr:
    			m = n.X
    		case *IndexExpr:
    			m = n.X
    		// case *SliceExpr:
    		case *AssertExpr:
    			m = n.X
    		case *TypeSwitchGuard:
    			if n.Lhs != nil {
    				m = n.Lhs
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    		(*ast.FuncDecl)(nil),
    		(*ast.FuncLit)(nil),
    		(*ast.GenDecl)(nil),
    		(*ast.RangeStmt)(nil),
    		(*ast.ReturnStmt)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(node ast.Node) {
    		switch node := node.(type) {
    		case *ast.RangeStmt:
    			checkCopyLocksRange(pass, node)
    		case *ast.FuncDecl:
    			checkCopyLocksFunc(pass, node.Name.Name, node.Recv, node.Type)
    		case *ast.FuncLit:
    			checkCopyLocksFunc(pass, "func", nil, node.Type)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/rangefunc/rewrite.go

    	ri := make(map[*syntax.FuncLit]bool)
    	for _, file := range files {
    		syntax.Inspect(file, func(n syntax.Node) bool {
    			switch n := n.(type) {
    			case *syntax.FuncDecl:
    				sig, _ := info.Defs[n.Name].Type().(*types2.Signature)
    				rewriteFunc(pkg, info, n.Type, n.Body, sig, ri)
    				return false
    			case *syntax.FuncLit:
    				sig, _ := info.Types[n].Type.(*types2.Signature)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
  4. 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)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go

    			return true
    		}
    	}
    	return false
    }
    
    // Validate the arguments of fuzz target.
    func validateFuzzArgs(pass *analysis.Pass, params *types.Tuple, expr ast.Expr) bool {
    	fLit, isFuncLit := expr.(*ast.FuncLit)
    	exprRange := expr
    	ok := true
    	if !isTestingType(params.At(0).Type(), "T") {
    		if isFuncLit {
    			exprRange = fLit.Type.Params.List[0].Type
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  6. src/cmd/cover/cover.go

    				walkBody = false
    			}
    		}
    		if walkBody {
    			ast.Walk(f, n.Body)
    		}
    		if *pkgcfg != "" {
    			flit := false
    			f.postFunc(n, fname, flit, n.Body)
    		}
    		return nil
    	case *ast.FuncLit:
    		// For function literals enclosed in functions, just glom the
    		// code for the literal in with the enclosing function (for now).
    		if f.fn.counterVar != "" {
    			return f
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  7. src/go/types/api.go

    	// type parameters, parameters, and named results, plus any
    	// local declarations in the body block.
    	// It is coextensive with the complete extent of the
    	// function's syntax ([*ast.FuncDecl] or [*ast.FuncLit]).
    	// The Scopes mapping does not contain an entry for the
    	// function body ([*ast.BlockStmt]); the function's scope is
    	// associated with the [*ast.FuncType].
    	//
    	// The following node types may appear in Scopes:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/api.go

    	// type parameters, parameters, and named results, plus any
    	// local declarations in the body block.
    	// It is coextensive with the complete extent of the
    	// function's syntax ([*ast.FuncDecl] or [*ast.FuncLit]).
    	// The Scopes mapping does not contain an entry for the
    	// function body ([*ast.BlockStmt]); the function's scope is
    	// associated with the [*ast.FuncType].
    	//
    	// The following node types may appear in Scopes:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  9. src/go/types/expr.go

    	old, found := check.untyped[x]
    	if !found {
    		return // nothing to do
    	}
    
    	// update operands of x if necessary
    	switch x := x.(type) {
    	case *ast.BadExpr,
    		*ast.FuncLit,
    		*ast.CompositeLit,
    		*ast.IndexExpr,
    		*ast.SliceExpr,
    		*ast.TypeAssertExpr,
    		*ast.StarExpr,
    		*ast.KeyValueExpr,
    		*ast.ArrayType,
    		*ast.StructType,
    		*ast.FuncType,
    		*ast.InterfaceType,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/expr.go

    	old, found := check.untyped[x]
    	if !found {
    		return // nothing to do
    	}
    
    	// update operands of x if necessary
    	switch x := x.(type) {
    	case *syntax.BadExpr,
    		*syntax.FuncLit,
    		*syntax.CompositeLit,
    		*syntax.IndexExpr,
    		*syntax.SliceExpr,
    		*syntax.AssertExpr,
    		*syntax.ListExpr,
    		//*syntax.StarExpr,
    		*syntax.KeyValueExpr,
    		*syntax.ArrayType,
    		*syntax.StructType,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
Back to top