- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 55 for fileText (0.15 sec)
-
testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/AutoTestedSamplesUtil.groovy
String includes = '**/*.groovy **/*.java' void findSamples(String dir, Closure runner) { def sources = findDir(dir) def ant = new AntBuilder() def list = ant.fileScanner { fileset(dir: sources, includes: includes) } list.each() { runSamplesFromFile(it, runner) } } static String findDir(String dir) { def workDir = SystemProperties.instance.currentDir
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 04 07:21:38 UTC 2024 - 2.9K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/argposition_test.go
type ShortPosition struct { Line int Column int Visited bool } type IdentPositionInfo map[string][]ShortPosition type Visitor struct { 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
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/types/self_test.go
b.Fatal(err) } } b.StopTimer() b.ReportMetric(float64(lines)*float64(b.N)/time.Since(start).Seconds(), "lines/s") } func pkgFiles(fset *token.FileSet, path string) ([]*ast.File, error) { filenames, err := pkgFilenames(path, true) // from stdlib_test.go if err != nil { return nil, err } var files []*ast.File for _, filename := range filenames {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 19:39:00 UTC 2023 - 2.8K bytes - Viewed (0) -
src/go/importer/importer_test.go
pkg, err := imp.Import(thePackage) if err != nil { t.Fatal(err) } if pkg.Path() != thePackage { t.Fatalf("Path() = %q, want %q", pkg.Path(), thePackage) } // Check that the fileset positions are accurate. // https://github.com/golang/go#28995 mathBigInt := pkg.Scope().Lookup("Int") posn := fset.Position(mathBigInt.Pos()) // "$GOROOT/src/math/big/int.go:25:1"
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/types/example_test.go
package fib type S string var a, b, c = len(b), S(c), "hello" func fib(x int) int { if x < 2 { return x } return fib(x-1) - fib(x-2) }` // We need a specific fileset in this test below for positions. // Cannot use typecheck helper. fset := token.NewFileSet() f := mustParse(fset, input) // Type-check the package. // We create an empty map for each kind of input
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/internal/srcimporter/srcimporter.go
"strings" "sync" _ "unsafe" // for go:linkname ) // An Importer provides the context for importing packages from source code. type Importer struct { ctxt *build.Context fset *token.FileSet sizes types.Sizes packages map[string]*types.Package } // New returns a new Importer for the given context, file set, and map // of packages. The context is used to resolve import paths to package paths,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 18:54:32 UTC 2022 - 8.2K bytes - Viewed (0) -
src/go/format/format.go
// // The function may return early (before the entire result is written) // and return a formatting error, for instance due to an incorrect AST. func Node(dst io.Writer, fset *token.FileSet, node any) error { // Determine if we have a complete source file (file != nil). var file *ast.File var cnode *printer.CommentedNode switch n := node.(type) { case *ast.File: file = n
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 4.3K bytes - Viewed (0) -
src/go/ast/commentmap.go
// } // return cmp.Compare(a.End(), b.End()) // }) return list } // A commentListReader helps iterating through a list of comment groups. type commentListReader struct { fset *token.FileSet list []*CommentGroup index int comment *CommentGroup // comment group at current index pos, end token.Position // source interval of comment group at current index }
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/cmd/gofmt/long_test.go
ngo = flag.Int("n", runtime.NumCPU(), "number of goroutines used") verbose = flag.Bool("verbose", false, "verbose mode") nfiles int // number of files processed ) func gofmt(fset *token.FileSet, filename string, src *bytes.Buffer) error { f, _, _, err := parse(fset, filename, src.Bytes(), false) if err != nil { return err } ast.SortImports(fset, f) src.Reset()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 20:27:28 UTC 2023 - 3.8K bytes - Viewed (0) -
src/go/internal/gcimporter/support.go
// We use -64 because it is rare; see issue 20080 and CL 41619. // -64 is the smallest int that fits in a single byte as a varint. const deltaNewFile = -64 // Synthesize a token.Pos type fakeFileSet struct { fset *token.FileSet files map[string]*fileInfo } type fileInfo struct { file *token.File lastline int } const maxlines = 64 * 1024 func (s *fakeFileSet) pos(file string, line, column int) token.Pos {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 4.1K bytes - Viewed (0)