- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 60 for Decl (0.07 sec)
-
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) -
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) -
test/map.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 06 21:02:55 UTC 2014 - 14.9K bytes - Viewed (0) -
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) -
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) -
src/cmd/cgo/ast.go
f.Name = make(map[string]*Name) f.NamePos = make(map[*Name]token.Pos) // In ast1, find the import "C" line and get any extra C preamble. sawC := false for _, decl := range ast1.Decls { switch decl := decl.(type) { case *ast.GenDecl: for _, spec := range decl.Specs { s, ok := spec.(*ast.ImportSpec) if !ok || s.Path.Value != `"C"` { continue } sawC = true if s.Name != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 07 16:54:27 UTC 2023 - 14.3K bytes - Viewed (0) -
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) -
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) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/imports.go
newImport.Name = &ast.Ident{Name: name} } // Find an import decl to add to. // The goal is to find an existing import // whose import path has the longest shared // prefix with path. var ( bestMatch = -1 // length of longest shared prefix lastImport = -1 // index in f.Decls of the file's final import decl impDecl *ast.GenDecl // import decl containing the best match
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 21:56:21 UTC 2022 - 13.4K bytes - Viewed (0) -
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)