Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 122 for Decl (0.03 sec)

  1. 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)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/imports.go

    		newImport.Name = &ast.Ident{Name: name}
    	}
    
    	// Find an import decl to add to.
    	// The goal is to find an existing import
    	// whose import path has the longest shared
    	// prefix with path.
    	var (
    		bestMatch  = -1         // length of longest shared prefix
    		lastImport = -1         // index in f.Decls of the file's final import decl
    		impDecl    *ast.GenDecl // import decl containing the best match
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 10 21:56:21 UTC 2022
    - 13.4K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go

    				// Blank the declared func name.
    				decl.Name.Name = "_"
    
    				// Turn a method receiver:  func (T) f(P) R {...}
    				// into regular parameter:  func _(T, P) R {...}
    				if decl.Recv != nil {
    					var params []*ast.Field
    					params = append(params, decl.Recv.List...)
    					params = append(params, decl.Type.Params.List...)
    					decl.Type.Params.List = params
    					decl.Recv = nil
    				}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  4. src/internal/types/testdata/check/const0.go

    var (
    	_ = iota /* ERROR "iota outside constant decl" */
    	_ = unsafe.Sizeof(iota  /* ERROR "iota outside constant decl" */ )
    	_ = unsafe.Sizeof(func() { _ = iota /* ERROR "iota outside constant decl" */ })
    	_ = unsafe.Sizeof(func() { var _ = iota /* ERROR "iota outside constant decl" */ })
    	_ = unsafe.Sizeof(func() { type _ [iota /* ERROR "iota outside constant decl" */ ]byte })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  5. src/go/parser/resolver.go

    		// remember the corresponding declaration for redeclaration
    		// errors and global variable resolution/typechecking phase
    		obj.Decl = decl
    		obj.Data = data
    		// Identifiers (for receiver type parameters) are written to the scope, but
    		// never set as the resolved object. See go.dev/issue/50956.
    		if _, ok := decl.(*ast.Ident); !ok {
    			ident.Obj = obj
    		}
    		if ident.Name != "_" {
    			if debugResolve {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 12:56:53 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  6. src/go/parser/resolver_test.go

    scanFile:
    	for {
    		pos, tok, lit := s.Scan()
    		switch tok {
    		case token.EOF:
    			break scanFile
    		case token.COMMENT:
    			name, decl, use := annotatedObj(lit)
    			if len(name) > 0 {
    				if decl {
    					if _, ok := decls[name]; ok {
    						panic(fmt.Sprintf("duplicate declaration markers for %s", name))
    					}
    					decls[name] = prev
    				}
    				if use {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 19 17:46:07 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  7. 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)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer/sigchanyzer.go

    		call := n.(*ast.CallExpr)
    		if !isSignalNotify(pass.TypesInfo, call) {
    			return
    		}
    		var chanDecl *ast.CallExpr
    		switch arg := call.Args[0].(type) {
    		case *ast.Ident:
    			if decl, ok := findDecl(arg).(*ast.CallExpr); ok {
    				chanDecl = decl
    			}
    		case *ast.CallExpr:
    			// Only signal.Notify(make(chan os.Signal), os.Interrupt) is safe,
    			// conservatively treat others as not safe, see golang/go#45043
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl/asmdecl.go

    	knownFunc := make(map[string]map[string]*asmFunc)
    
    	for _, f := range pass.Files {
    		for _, decl := range f.Decls {
    			if decl, ok := decl.(*ast.FuncDecl); ok && decl.Body == nil {
    				knownFunc[decl.Name.Name] = asmParseDecl(pass, decl)
    			}
    		}
    	}
    
    Files:
    	for _, fname := range sfiles {
    		content, tf, err := analysisutil.ReadFile(pass, fname)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  10. src/cmd/fix/fix.go

    		Path: &ast.BasicLit{
    			Kind:  token.STRING,
    			Value: strconv.Quote(ipath),
    		},
    	}
    
    	// Find an import decl to add to.
    	var (
    		bestMatch  = -1
    		lastImport = -1
    		impDecl    *ast.GenDecl
    		impIndex   = -1
    	)
    	for i, decl := range f.Decls {
    		gen, ok := decl.(*ast.GenDecl)
    		if ok && gen.Tok == token.IMPORT {
    			lastImport = i
    			// Do not add to import "C", to avoid disrupting the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 14.6K bytes
    - Viewed (0)
Back to top