Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 158 for pkgname (0.24 sec)

  1. src/cmd/compile/internal/types2/resolver.go

    				}
    
    				pkgName := NewPkgName(s.Pos(), pkg, name, imp)
    				if s.LocalPkgName != nil {
    					// in a dot-import, the dot represents the package
    					check.recordDef(s.LocalPkgName, pkgName)
    				} else {
    					check.recordImplicit(s, pkgName)
    				}
    
    				if imp.fake {
    					// match 1.17 cmd/compile (not prescribed by spec)
    					pkgName.used = true
    				}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  2. src/go/types/resolver.go

    				}
    
    				pkgName := NewPkgName(d.spec.Pos(), pkg, name, imp)
    				if d.spec.Name != nil {
    					// in a dot-import, the dot represents the package
    					check.recordDef(d.spec.Name, pkgName)
    				} else {
    					check.recordImplicit(d.spec, pkgName)
    				}
    
    				if imp.fake {
    					// match 1.17 cmd/compile (not prescribed by spec)
    					pkgName.used = true
    				}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  3. src/go/types/object.go

    	}
    	if !ea {
    		return a.pkg.path < b.pkg.path
    	}
    
    	return false
    }
    
    // A PkgName represents an imported Go package.
    // PkgNames don't have a type.
    type PkgName struct {
    	object
    	imported *Package
    	used     bool // set if the package was used
    }
    
    // NewPkgName returns a new PkgName object representing an imported package.
    // The remaining arguments set the attributes found with all Objects.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/check_test.go

    		t.Fatal("no source files")
    	}
    
    	// parse files
    	files, errlist := parseFiles(t, filenames, srcs, 0)
    	pkgName := "<no package>"
    	if len(files) > 0 {
    		pkgName = files[0].PkgName.Value
    	}
    	listErrors := manual && !*verifyErrors
    	if listErrors && len(errlist) > 0 {
    		t.Errorf("--- %s:", pkgName)
    		for _, err := range errlist {
    			t.Error(err)
    		}
    	}
    
    	// set up typechecker
    	var conf Config
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  5. src/internal/reflectlite/reflect_mirror_test.go

    				}
    			}
    		}
    	}
    	return v
    }
    
    func loadTypes(path, pkgName string, v visitor) {
    	fset := token.NewFileSet()
    
    	filter := func(fi fs.FileInfo) bool {
    		return strings.HasSuffix(fi.Name(), ".go")
    	}
    	pkgs, err := parser.ParseDir(fset, path, filter, 0)
    	if err != nil {
    		panic(err)
    	}
    
    	pkg := pkgs[pkgName]
    
    	for _, f := range pkg.Files {
    		ast.Walk(v, f)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 21:11:15 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/object.go

    	}
    	if !ea {
    		return a.pkg.path < b.pkg.path
    	}
    
    	return false
    }
    
    // A PkgName represents an imported Go package.
    // PkgNames don't have a type.
    type PkgName struct {
    	object
    	imported *Package
    	used     bool // set if the package was used
    }
    
    // NewPkgName returns a new PkgName object representing an imported package.
    // The remaining arguments set the attributes found with all Objects.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  7. src/go/types/api.go

    	}
    	pkgname, _ := obj.(*PkgName)
    	return pkgname
    }
    
    // TypeAndValue reports the type and value (for constants)
    // of the corresponding expression.
    type TypeAndValue struct {
    	mode  operandMode
    	Type  Type
    	Value constant.Value
    }
    
    // IsVoid reports whether the corresponding expression
    // is a function call without results.
    func (tv TypeAndValue) IsVoid() bool {
    	return tv.mode == novalue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  8. src/go/types/check_test.go

    	}
    
    	// parse files
    	files, errlist := parseFiles(t, filenames, srcs, parser.AllErrors)
    	pkgName := "<no package>"
    	if len(files) > 0 {
    		pkgName = files[0].Name.Name
    	}
    	listErrors := manual && !*verifyErrors
    	if listErrors && len(errlist) > 0 {
    		t.Errorf("--- %s:", pkgName)
    		for _, err := range errlist {
    			t.Error(err)
    		}
    	}
    
    	// set up typechecker
    	var conf Config
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/api.go

    		obj = info.Implicits[imp]
    	}
    	pkgname, _ := obj.(*PkgName)
    	return pkgname
    }
    
    // TypeAndValue reports the type and value (for constants)
    // of the corresponding expression.
    type TypeAndValue struct {
    	mode  operandMode
    	Type  Type
    	Value constant.Value
    }
    
    // IsVoid reports whether the corresponding expression
    // is a function call without results.
    func (tv TypeAndValue) IsVoid() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    			return ast.NewIdent(t.Obj().Name())
    		}
    		pkgName := t.Obj().Pkg().Name()
    
    		// If the file already imports the package under another name, use that.
    		for _, cand := range f.Imports {
    			if path, _ := strconv.Unquote(cand.Path.Value); path == t.Obj().Pkg().Path() {
    				if cand.Name != nil && cand.Name.Name != "" {
    					pkgName = cand.Name.Name
    				}
    			}
    		}
    		if pkgName == "." {
    			return ast.NewIdent(t.Obj().Name())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
Back to top