Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 93 for decls (0.14 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go

    		for _, decl := range f.Decls {
    			switch decl := decl.(type) {
    			case *ast.GenDecl:
    				switch decl.Tok {
    				case token.TYPE:
    					// Discard type declarations.
    					continue
    				case token.IMPORT:
    					// Keep imports.
    				case token.VAR, token.CONST:
    					// Blank the declared var/const names.
    					for _, spec := range decl.Specs {
    						spec := spec.(*ast.ValueSpec)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  6. src/cmd/cgo/ast.go

    					ws++
    				}
    			}
    			if ws == 0 {
    				continue
    			}
    			d.Specs = d.Specs[0:ws]
    			ast2.Decls[w] = d
    			w++
    		}
    		ast2.Decls = ast2.Decls[0:w]
    	} else {
    		for _, decl := range ast2.Decls {
    			d, ok := decl.(*ast.GenDecl)
    			if !ok {
    				continue
    			}
    			for _, spec := range d.Specs {
    				if s, ok := spec.(*ast.ImportSpec); ok && s.Path.Value == `"C"` {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  7. src/go/printer/printer_test.go

    	if got != want {
    		t.Errorf("got:\n%s\nwant:\n%s\n", got, want)
    	}
    }
    
    var decls = []string{
    	`import "fmt"`,
    	"const pi = 3.1415\nconst e = 2.71828\n\nvar x = pi",
    	"func sum(x, y int) int\t{ return x + y }",
    }
    
    func TestDeclLists(t *testing.T) {
    	for _, src := range decls {
    		file, err := parser.ParseFile(fset, "", "package p;"+src, parser.ParseComments)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/internal/passes/BUILD

        ],
    )
    
    gentbl_cc_library(
        name = "clustering_passes_inc_gen",
        compatible_with = get_compatible_with_portable(),
        tbl_outs = [
            (
                [
                    "-gen-pass-decls",
                    "-name=TFXLABridgeClustering",
                ],
                "clustering_passes.h.inc",
            ),
        ],
        tblgen = "@llvm-project//mlir:mlir-tblgen",
        td_file = "clustering_passes.td",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 17:50:14 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/BUILD

        ],
    )
    
    gentbl_cc_library(
        name = "tensorflow_op_interfaces_inc_gen",
        compatible_with = get_compatible_with_portable(),
        tbl_outs = [
            (
                ["-gen-op-interface-decls"],
                "ir/tf_op_interfaces.h.inc",
            ),
            (
                ["-gen-op-interface-defs"],
                "ir/tf_op_interfaces.cc.inc",
            ),
        ],
        tblgen = "@llvm-project//mlir:mlir-tblgen",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 47.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/BUILD

        ],
    )
    
    gentbl_cc_library(
        name = "tf_pass_inc_gen",
        compatible_with = get_compatible_with_portable(),
        tbl_outs = [
            (
                [
                    "-gen-pass-decls",
                    "-name=TensorFlow",
                ],
                "tf_passes.h.inc",
            ),
            (
                ["-gen-pass-doc"],
                "g3doc/_includes/tf_passes.md",
            ),
        ],
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 22:19:26 UTC 2024
    - 35.7K bytes
    - Viewed (0)
Back to top