- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 220 for ndecls (0.11 sec)
-
src/go/ast/filter.go
// Collect declarations from all package files. var decls []Decl if ndecls > 0 { decls = make([]Decl, ndecls) funcs := make(map[string]int) // map of func name -> decls index i := 0 // current index n := 0 // number of filtered entries for _, filename := range filenames { f := pkg.Files[filename] for _, d := range f.Decls { if mode&FilterFuncDuplicates != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 13.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go
var fnDecls map[*types.Func]*ast.FuncDecl // computed lazily return func(f *types.Func) *ast.FuncDecl { if f != nil && fnDecls == nil { fnDecls = make(map[*types.Func]*ast.FuncDecl) for _, file := range files { for _, decl := range file.Decls { if fnDecl, ok := decl.(*ast.FuncDecl); ok { if fn, ok := info.Defs[fnDecl.Name].(*types.Func); ok { fnDecls[fn] = fnDecl
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 2.4K 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")
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/types/decl.go
saved := obj.color_ obj.color_ = black fdecl := decl.fdecl check.funcType(sig, fdecl.Recv, fdecl.Type) obj.color_ = saved // Set the scope's extent to the complete "func (...) { ... }" // so that Scope.Innermost works correctly. sig.scope.pos = fdecl.Pos() sig.scope.end = fdecl.End() if fdecl.Type.TypeParams.NumFields() > 0 && fdecl.Body == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0) -
src/internal/types/testdata/check/decls1.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // variable declarations package decls1 import ( "math" ) // Global variables without initialization var ( a, b bool c byte d uint8 r rune i int j, k, l int x, y float32 xx, yy float64 u, v complex64 uu, vv complex128 s, t string
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 05 18:13:11 UTC 2024 - 3.8K bytes - Viewed (0) -
src/internal/types/testdata/check/decls4.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // type aliases package decls4 type ( T0 [10]int T1 []byte T2 struct { x int } T3 interface{ m() T2 } T4 func(int, T0) chan T2 ) type ( Ai = int A0 = T0 A1 = T1 A2 = T2 A3 = T3 A4 = T4 A10 = [10]int
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 09 17:24:42 UTC 2023 - 3.2K bytes - Viewed (0) -
src/go/doc/example.go
funcDecl := &ast.FuncDecl{ Name: ast.NewIdent("main"), Type: f.Type, Body: body, } decls := make([]ast.Decl, 0, 2+len(depDecls)) decls = append(decls, importDecl) decls = append(decls, depDecls...) decls = append(decls, funcDecl) slices.SortFunc(decls, func(a, b ast.Decl) int { return cmp.Compare(a.Pos(), b.Pos()) }) slices.SortFunc(comments, func(a, b *ast.CommentGroup) int {
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/compile/internal/typecheck/mkbuiltin.go
var interner typeInterner fmt.Fprintf(w, "var %sDecls = [...]struct { name string; tag int; typ int }{\n", name) for _, decl := range f.Decls { switch decl := decl.(type) { case *ast.FuncDecl: if decl.Recv != nil { log.Fatal("methods unsupported") } if decl.Body != nil { log.Fatal("unexpected function body") } fmt.Fprintf(w, "{%q, funcTag, %d},\n", decl.Name.Name, interner.intern(decl.Type))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 26 21:56:49 UTC 2023 - 6K bytes - Viewed (0) -
src/internal/types/testdata/check/decls3.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // embedded types package decls3 import "unsafe" import "fmt" // fields with the same name at the same level cancel each other out func _() { type ( T1 struct { X int } T2 struct { X int }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 23:16:04 UTC 2023 - 4.2K bytes - Viewed (0) -
src/cmd/internal/goobj/mkbuiltin.go
if err != nil { log.Fatal(err) } decls := make(map[string]bool) fmt.Fprintf(w, "var builtins = [...]struct{ name string; abi int }{\n") for _, decl := range f.Decls { switch decl := decl.(type) { case *ast.FuncDecl: if decl.Recv != nil { log.Fatal("methods unsupported") } if decl.Body != nil { log.Fatal("unexpected function body") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:27 UTC 2023 - 3.8K bytes - Viewed (0)