Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for Decl (0.06 sec)

  1. src/go/types/decl.go

    	// in check.decl. Initialization expressions depending on other
    	// consts, vars, or functions, add dependencies to the current
    	// check.decl.
    	switch obj := obj.(type) {
    	case *Const:
    		check.decl = d // new package-level const decl
    		check.constDecl(obj, d.vtyp, d.init, d.inherited)
    	case *Var:
    		check.decl = d // new package-level var decl
    		check.varDecl(obj, d.lhs, d.vtyp, d.init)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/decl.go

    	// in check.decl. Initialization expressions depending on other
    	// consts, vars, or functions, add dependencies to the current
    	// check.decl.
    	switch obj := obj.(type) {
    	case *Const:
    		check.decl = d // new package-level const decl
    		check.constDecl(obj, d.vtyp, d.init, d.inherited)
    	case *Var:
    		check.decl = d // new package-level var decl
    		check.varDecl(obj, d.lhs, d.vtyp, d.init)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  3. src/go/doc/reader.go

    		}
    	}
    
    	*values = append(*values, &Value{
    		Doc:   decl.Doc.Text(),
    		Names: specNames(decl.Specs),
    		Decl:  decl,
    		order: r.order,
    	})
    	if r.mode&PreserveAST == 0 {
    		decl.Doc = nil // doc consumed - remove from AST
    	}
    	// Note: It's important that the order used here is global because the cleanupTypes
    	// methods may move values associated with types back into the global list. If the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  4. src/cmd/doc/pkg.go

    				// Now print the consts, vars, and constructors.
    				for _, c := range typ.Consts {
    					if decl := pkg.oneLineNode(c.Decl); decl != "" {
    						pkg.Printf(indent+"%s\n", decl)
    					}
    				}
    				for _, v := range typ.Vars {
    					if decl := pkg.oneLineNode(v.Decl); decl != "" {
    						pkg.Printf(indent+"%s\n", decl)
    					}
    				}
    				for _, constructor := range typ.Funcs {
    					if isExported(constructor.Name) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 20:15:52 UTC 2024
    - 32K bytes
    - Viewed (0)
  5. src/go/types/resolver.go

    			case funcDecl:
    				name := d.decl.Name.Name
    				obj := NewFunc(d.decl.Name.Pos(), pkg, name, nil) // signature set later
    				hasTParamError := false                           // avoid duplicate type parameter errors
    				if d.decl.Recv.NumFields() == 0 {
    					// regular function
    					if d.decl.Recv != nil {
    						check.error(d.decl.Recv, BadRecv, "method has no receiver")
    						// treat as function
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  6. src/go/doc/example.go

    //
    // topDecls maps objects to the top-level declaration declaring them (not
    // necessarily obj.Decl, as obj.Decl will be a Spec for GenDecls, but
    // topDecls[obj] will be the GenDecl itself).
    func findDeclsAndUnresolved(body ast.Node, topDecls map[*ast.Object]ast.Decl, typMethods map[string][]ast.Decl) ([]ast.Decl, map[string]bool) {
    	// This function recursively finds every top-level declaration used
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go

    				// Blank the declared func name.
    				decl.Name.Name = "_"
    
    				// Turn a method receiver:  func (T) f(P) R {...}
    				// into regular parameter:  func _(T, P) R {...}
    				if decl.Recv != nil {
    					var params []*ast.Field
    					params = append(params, decl.Recv.List...)
    					params = append(params, decl.Type.Params.List...)
    					decl.Type.Params.List = params
    					decl.Recv = nil
    				}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  8. src/go/parser/resolver.go

    		// remember the corresponding declaration for redeclaration
    		// errors and global variable resolution/typechecking phase
    		obj.Decl = decl
    		obj.Data = data
    		// Identifiers (for receiver type parameters) are written to the scope, but
    		// never set as the resolved object. See go.dev/issue/50956.
    		if _, ok := decl.(*ast.Ident); !ok {
    			ident.Obj = obj
    		}
    		if ident.Name != "_" {
    			if debugResolve {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 12:56:53 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl/asmdecl.go

    	knownFunc := make(map[string]map[string]*asmFunc)
    
    	for _, f := range pass.Files {
    		for _, decl := range f.Decls {
    			if decl, ok := decl.(*ast.FuncDecl); ok && decl.Body == nil {
    				knownFunc[decl.Name.Name] = asmParseDecl(pass, decl)
    			}
    		}
    	}
    
    Files:
    	for _, fname := range sfiles {
    		content, tf, err := analysisutil.ReadFile(pass, fname)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  10. src/go/ast/filter.go

    //
    // FilterDecl reports whether there are any declared names left after
    // filtering.
    func FilterDecl(decl Decl, f Filter) bool {
    	return filterDecl(decl, f, false)
    }
    
    func filterDecl(decl Decl, f Filter, export bool) bool {
    	switch d := decl.(type) {
    	case *GenDecl:
    		d.Specs = filterSpecList(d.Specs, f, export)
    		return len(d.Specs) > 0
    	case *FuncDecl:
    		return f(d.Name.Name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top