- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 243 for decls (0.04 sec)
-
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/imports.go
deleted = true copy(gen.Specs[j:], gen.Specs[j+1:]) gen.Specs = gen.Specs[:len(gen.Specs)-1] // If this was the last import spec in this decl, // delete the decl, too. if len(gen.Specs) == 0 { copy(f.Decls[i:], f.Decls[i+1:]) f.Decls = f.Decls[:len(f.Decls)-1] i-- break } else if len(gen.Specs) == 1 { if impspec.Doc != nil { delcomments = append(delcomments, impspec.Doc) }
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/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/go/parser/resolver_test.go
func declsFromComments(handle *token.File, src []byte) map[token.Pos]token.Pos { decls, uses := positionMarkers(handle, src) objmap := make(map[token.Pos]token.Pos) // Join decls and uses on name, to build the map of use->decl. for name, posns := range uses { declpos, ok := decls[name] if !ok { panic(fmt.Sprintf("missing declaration for %s", name)) } for _, pos := range posns {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 19 17:46:07 UTC 2022 - 4.9K bytes - Viewed (0) -
test/clearfat.go
"strconv" "strings" ) const ntest = 1100 func main() { var decls, calls bytes.Buffer for i := 1; i <= ntest; i++ { s := strconv.Itoa(i) decls.WriteString(strings.Replace(decl, "$", s, -1)) calls.WriteString(strings.Replace("poison$()\n\tclearfat$()\n\t", "$", s, -1)) } program = strings.Replace(program, "$DECLS", decls.String(), 1) program = strings.Replace(program, "$CALLS", calls.String(), 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 31 15:08:27 UTC 2014 - 1.1K bytes - Viewed (0) -
test/fixedbugs/bug449.go
"fmt" "strconv" "strings" ) const ntest = 1024 func main() { var decls, calls bytes.Buffer for i := 1; i <= ntest; i++ { s := strconv.Itoa(i) decls.WriteString(strings.Replace(decl, "$", s, -1)) calls.WriteString(strings.Replace("call(test$)\n\t", "$", s, -1)) } program = strings.Replace(program, "$DECLS", decls.String(), 1) program = strings.Replace(program, "$CALLS", calls.String(), 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 01 03:02:46 UTC 2012 - 1.5K bytes - Viewed (0) -
src/go/ast/commentmap_test.go
if err != nil { t.Fatal(err) } cmap := NewCommentMap(fset, f, f.Comments) // delete variable declaration for i, decl := range f.Decls { if gen, ok := decl.(*GenDecl); ok && gen.Tok == token.VAR { copy(f.Decls[i:], f.Decls[i+1:]) f.Decls = f.Decls[:len(f.Decls)-1] break } } // check if comments are filtered correctly cc := cmap.Filter(f) for n, list := range cc {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 09 15:35:30 UTC 2022 - 3.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/ir/BUILD
name = "tfrt_fallback_sync_opdefs_inc_gen", tbl_outs = [ ( ["-gen-op-decls"], "tfrt_fallback_sync.h.inc", ), ( ["-gen-op-defs"], "tfrt_fallback_sync.cpp.inc", ), ( [ "-gen-dialect-decls", "-dialect=tfrt_fallback_sync", ],
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 27 20:43:07 UTC 2024 - 7.4K bytes - Viewed (0) -
src/cmd/fix/fix.go
impIndex = j } } } } // If no import decl found, add one after the last import. if impDecl == nil { impDecl = &ast.GenDecl{ Tok: token.IMPORT, } f.Decls = append(f.Decls, nil) copy(f.Decls[lastImport+2:], f.Decls[lastImport+1:]) f.Decls[lastImport+1] = impDecl } // Ensure the import decl has parentheses, if needed.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 14.6K 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) -
src/go/ast/example_test.go
cmap := ast.NewCommentMap(fset, f, f.Comments) // Remove the first variable declaration from the list of declarations. for i, decl := range f.Decls { if gen, ok := decl.(*ast.GenDecl); ok && gen.Tok == token.VAR { copy(f.Decls[i:], f.Decls[i+1:]) f.Decls = f.Decls[:len(f.Decls)-1] break } } // Use the comment map to filter comments that don't belong anymore
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0)