- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 135 for cdecl (0.04 sec)
-
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/internal/types/errors/generrordocs.go
} _, err = conf.Check("types", fset, []*ast.File{file}, info) if err != nil { log.Fatalf("Check failed: %s", err) } for _, decl := range file.Decls { decl, ok := decl.(*ast.GenDecl) if !ok || decl.Tok != token.CONST { continue } for _, spec := range decl.Specs { spec, ok := spec.(*ast.ValueSpec) if !ok || len(spec.Names) == 0 { continue } obj := info.ObjectOf(spec.Names[0])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 03:14:42 UTC 2023 - 3K 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/cmd/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go
type declInfo struct { decl *ast.FuncDecl cfg *cfg.CFG // iff decl.Body != nil started bool // to break cycles noReturn bool } type litInfo struct { cfg *cfg.CFG noReturn bool } // FuncDecl returns the control-flow graph for a named function. // It returns nil if decl.Body==nil. func (c *CFGs) FuncDecl(decl *ast.FuncDecl) *cfg.CFG { if decl.Body == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 6.6K bytes - Viewed (0) -
src/go/token/example_test.go
return } // Print the location and kind of each declaration in f. for _, decl := range f.Decls { // Get the filename, line, and column back via the file set. // We get both the relative and absolute position. // The relative position is relative to the last line directive. // The absolute position is the exact position in the source. pos := decl.Pos() relPosition := fset.Position(pos) absPosition := fset.PositionFor(pos, false)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 22:09:31 UTC 2023 - 1.7K bytes - Viewed (0) -
src/cmd/internal/dwarf/putvarabbrevgen_test.go
abbrevs := make(map[string]int) funcs := map[string]ast.Stmt{} for _, decl := range f.Decls { decl, ok := decl.(*ast.FuncDecl) if !ok || decl.Body == nil { continue } if decl.Name.Name == "putvar" || decl.Name.Name == "putAbstractVar" { // construct the simplified CFG pvagraph, _ := pvacfgbody(t, &fset, cm, decl.Body.List) funcs[decl.Name.Name+"Abbrev"] = pvacfgvisit(pvagraph, abbrevs) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:45:07 UTC 2024 - 8.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go
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 } } } } } // TODO: set f = f.Origin() here.
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/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/internal/types/errors/codes_test.go
Uses: make(map[*ast.Ident]Object), } _, err = conf.Check("types", fset, []*ast.File{file}, info) if err != nil { t.Fatal(err) } for _, decl := range file.Decls { decl, ok := decl.(*ast.GenDecl) if !ok || decl.Tok != token.CONST { continue } for _, spec := range decl.Specs { spec, ok := spec.(*ast.ValueSpec) if !ok || len(spec.Names) == 0 { continue } obj := info.ObjectOf(spec.Names[0])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 18 20:41:45 UTC 2022 - 4.9K bytes - Viewed (0) -
test/clearfat.go
"fmt" "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)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 31 15:08:27 UTC 2014 - 1.1K bytes - Viewed (0)