- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 259 for fsel (0.12 sec)
-
src/go/types/example_test.go
`, } { files = append(files, mustParse(fset, src)) } // Type-check a package consisting of these files. // Type information for the imported "fmt" package // comes from $GOROOT/pkg/$GOOS_$GOOARCH/fmt.a. conf := types.Config{Importer: importer.Default()} pkg, err := conf.Check("temperature", fset, files, nil) if err != nil { log.Fatal(err) } // Print the tree of scopes.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.9K bytes - Viewed (0) -
src/go/scanner/example_test.go
// src is the input that we want to tokenize. src := []byte("cos(x) + 1i*sin(x) // Euler") // Initialize the scanner. var s scanner.Scanner fset := token.NewFileSet() // positions are relative to fset file := fset.AddFile("", fset.Base(), len(src)) // register input "file" s.Init(file, src, nil /* no error handler */, scanner.ScanComments)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 27 19:47:49 UTC 2022 - 1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go
if err != nil { log.Fatal(err) } fset := token.NewFileSet() results, err := run(fset, cfg, analyzers) if err != nil { log.Fatal(err) } // In VetxOnly mode, the analysis is run only for facts. if !cfg.VetxOnly { if analysisflags.JSON { // JSON output tree := make(analysisflags.JSONTree) for _, res := range results { tree.Add(fset, cfg.ID, res.a.Name, res.diagnostics, res.err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 13K bytes - Viewed (0) -
src/go/parser/parser_test.go
} var sel *ast.SelectorExpr ast.Inspect(f, func(n ast.Node) bool { if n, ok := n.(*ast.SelectorExpr); ok { sel = n } return true }) if sel == nil { t.Error("found no *ast.SelectorExpr") continue } const wantSel = "&{fmt _}" if fmt.Sprint(sel) != wantSel { t.Errorf("found selector %s, want %s", sel, wantSel) continue } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 24.6K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/argposition_test.go
identPosInfo IdentPositionInfo fset *token.FileSet t *testing.T } func (v *Visitor) Visit(node ast.Node) ast.Visitor { if ident, ok := node.(*ast.Ident); ok { if expectedPositions, ok := v.identPosInfo[ident.Name]; ok { gotMatch := false var errorMessage strings.Builder for caseIndex, expectedPos := range expectedPositions { actualPosition := v.fset.PositionFor(ident.Pos(), true)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 19 01:37:31 UTC 2023 - 3.1K bytes - Viewed (0) -
src/go/importer/importer_test.go
} export := strings.TrimSpace(string(out)) compiler, target, _ := strings.Cut(export, ":") if compiler == "gccgo" { t.Skip("golang.org/issue/22500") } fset := token.NewFileSet() t.Run("LookupDefault", func(t *testing.T) { imp := ForCompiler(fset, compiler, nil) pkg, err := imp.Import(thePackage) if err != nil { t.Fatal(err) } if pkg.Path() != thePackage {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 25 21:16:32 UTC 2023 - 2.8K bytes - Viewed (0) -
src/go/parser/interface.go
// are returned via a scanner.ErrorList which is sorted by source position. func ParseFile(fset *token.FileSet, filename string, src any, mode Mode) (f *ast.File, err error) { if fset == nil { panic("parser.ParseFile: no token.FileSet provided (fset == nil)") } // get source text, err := readSource(filename, src) if err != nil { return nil, err } var p parser
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 7.5K bytes - Viewed (0) -
src/cmd/cover/func.go
} // findFuncs parses the file and returns a slice of FuncExtent descriptors. func findFuncs(name string) ([]*FuncExtent, error) { fset := token.NewFileSet() parsedFile, err := parser.ParseFile(fset, name, nil, 0) if err != nil { return nil, err } visitor := &FuncVisitor{ fset: fset, name: name, astFile: parsedFile, } ast.Walk(visitor, visitor.astFile) return visitor.funcs, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 17:49:12 UTC 2022 - 6.3K bytes - Viewed (0) -
cmd/preferredimports/preferredimports.go
aliases = map[*regexp.Regexp]string{} ) type analyzer struct { fset *token.FileSet // positions are relative to fset ctx build.Context failed bool donePaths map[string]interface{} } func newAnalyzer() *analyzer { ctx := build.Default ctx.CgoEnabled = true a := &analyzer{ fset: token.NewFileSet(), ctx: ctx, donePaths: make(map[string]interface{}), }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:44 UTC 2024 - 7.1K bytes - Viewed (0) -
src/internal/bytealg/compare_ppc64x.s
// -1 is in R20, and 1 is in R21. crxlt and crxeq must // also be the same CR field. #define _SETB(crxlt, crxeq, rout) \ ISEL crxeq,R0,R21,rout \ ISEL crxlt,R20,rout,rout // A special case when it is know the comparison // will always be not equal. The result must be -1 or 1. #define SETB_CR0_NE(rout) \ ISEL CR0LT,R20,R21,rout #define SETB_CR0(rout) _SETB(CR0LT, CR0EQ, rout) #define SETB_CR1(rout) _SETB(CR1LT, CR1EQ, rout)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:33:20 UTC 2023 - 6.7K bytes - Viewed (0)