- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 25 for Tok (0.02 sec)
-
src/cmd/compile/internal/types2/labels.go
stmtBranches(s.Stmt) case *syntax.BranchStmt: if s.Label == nil { return // checked in 1st pass (check.stmt) } // determine and validate target name := s.Label.Value switch s.Tok { case syntax.Break: // spec: "If there is a label, it must be that of an enclosing // "for", "switch", or "select" statement, and that is the one // whose execution terminates." valid := false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 7.2K bytes - Viewed (0) -
src/go/doc/reader.go
if s, ok := d.Specs[0].(*ast.ValueSpec); ok { return s.Names[0].Name } } return "" } func sortedValues(m []*Value, tok token.Token) []*Value { list := make([]*Value, len(m)) // big enough in any case i := 0 for _, val := range m { if val.Decl.Tok == tok { list[i] = val i++ } } list = list[0:i] slices.SortFunc(list, func(a, b *Value) int {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 27.5K bytes - Viewed (0) -
pilot/pkg/bootstrap/istio_ca.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 17:48:28 UTC 2024 - 20.6K bytes - Viewed (0) -
src/go/printer/printer_test.go
// be parsed. func TestEmptyDecl(t *testing.T) { // issue 63566 for _, tok := range []token.Token{token.IMPORT, token.CONST, token.TYPE, token.VAR} { var buf bytes.Buffer Fprint(&buf, token.NewFileSet(), &ast.GenDecl{Tok: tok}) got := buf.String() want := tok.String() + " ()" if got != want { t.Errorf("got %q, want %q", got, want) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/cmd/cgo/godefs.go
refName := make(map[*ast.Expr]*Name) for _, r := range f.Ref { refName[r.Expr] = r.Name } for _, d := range f.AST.Decls { d, ok := d.(*ast.GenDecl) if !ok || d.Tok != token.TYPE { continue } for _, s := range d.Specs { s := s.(*ast.TypeSpec) n := refName[&s.Type] if n != nil && n.Mangle != "" { override[n.Mangle] = s.Name.Name } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 3.2K bytes - Viewed (0) -
src/go/ast/example_test.go
// and AST nodes. 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) -
src/go/doc/example.go
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/go/ast/import.go
// It also removes duplicate imports when it is possible to do so without data loss. func SortImports(fset *token.FileSet, f *File) { for _, d := range f.Decls { d, ok := d.(*GenDecl) if !ok || d.Tok != token.IMPORT { // Not an import declaration, so we're done. // Imports are always first. break } if !d.Lparen.IsValid() { // Not a block: sorted by default. continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5.7K bytes - Viewed (0) -
pkg/volume/csi/nodeinfomanager/nodeinfomanager.go
} var oldAnnotationSet sets.Set[string] mpa := nodeInfoAnnotations[v1.MigratedPluginsAnnotationKey] tok := strings.Split(mpa, ",") if len(mpa) == 0 { oldAnnotationSet = sets.New[string]() } else { oldAnnotationSet = sets.New[string](tok...) } newAnnotationSet := sets.New[string]() for pluginName, migratedFunc := range migratedPlugins { if migratedFunc() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 11 09:02:45 UTC 2024 - 20.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stmt.go
return } var x operand check.binary(&x, nil, lhs[0], rhs[0], s.Op) check.assignVar(lhs[0], nil, &x, "assignment") case *syntax.CallStmt: kind := "go" if s.Tok == syntax.Defer { kind = "defer" } check.suspendedCall(kind, s.Call) case *syntax.ReturnStmt: res := check.sig.results // Return with implicit results allowed for function with named results.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.7K bytes - Viewed (0)