- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for FileStart (0.17 sec)
-
src/go/types/version.go
assert(pos.IsValid()) // Eval and CheckExpr tests may not have any source files. if len(check.files) == 0 { return nil } for _, file := range check.files { if file.FileStart <= pos && pos < file.FileEnd { return file } } panic(check.sprintf("file not found for pos = %d (%s)", int(pos), check.fset.Position(pos)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 23:12:40 UTC 2024 - 3.2K bytes - Viewed (0) -
src/go/ast/example_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0) -
src/go/ast/filter.go
filenames[i] = filename i++ if f.Doc != nil { ndocs += len(f.Doc.List) + 1 // +1 for separator } ncomments += len(f.Comments) ndecls += len(f.Decls) if i == 0 || f.FileStart < minPos { minPos = f.FileStart } if i == 0 || f.FileEnd > maxPos { maxPos = f.FileEnd } } slices.Sort(filenames) // Collect package comments from all package files into a single
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 13.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/analysis.go
ResultOf map[*Analyzer]interface{} // ReadFile returns the contents of the named file. // // The only valid file names are the elements of OtherFiles // and IgnoredFiles, and names returned by // Fset.File(f.FileStart).Name() for each f in Files. // // Analyzers must use this function (if provided) instead of // accessing the file system directly. This allows a driver to // provide a virtualized file tree (including, for example,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 9.1K bytes - Viewed (0) -
src/go/parser/parser_test.go
if err != nil { t.Fatal(err) } // File{Start,End} spans the entire file, not just the declarations. if got, want := fset.Position(f.FileStart).String(), "file.go:1:1"; got != want { t.Errorf("for File.FileStart, got %s, want %s", got, want) } // The end position is the newline at the end of the /* end of file */ line.
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/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go
if slicesContains(pass.OtherFiles, filename) || slicesContains(pass.IgnoredFiles, filename) { return nil } for _, f := range pass.Files { // TODO(adonovan): use go1.20 f.FileStart if pass.Fset.File(f.Pos()).Name() == filename { return nil } } return fmt.Errorf("Pass.ReadFile: %s is not among OtherFiles, IgnoredFiles, or names of Files", filename) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 11.7K bytes - Viewed (0) -
src/go/ast/ast.go
Doc *CommentGroup // associated documentation; or nil Package token.Pos // position of "package" keyword Name *Ident // package name Decls []Decl // top-level declarations; or nil FileStart, FileEnd token.Pos // start and end of entire file Scope *Scope // package scope (this file only). Deprecated: see Object Imports []*ImportSpec // imports in this file
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
src/go/parser/parser.go
decls = append(decls, p.parseDecl(declStart)) } } } f := &ast.File{ Doc: doc, Package: pos, Name: ident, Decls: decls, FileStart: token.Pos(p.file.Base()), FileEnd: token.Pos(p.file.Base() + p.file.Size()), Imports: p.imports, Comments: p.comments, GoVersion: p.goVersion, } var declErr func(token.Pos, string)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"FieldList.Opening", Field, 0}, {"File", Type, 0}, {"File.Comments", Field, 0}, {"File.Decls", Field, 0}, {"File.Doc", Field, 0}, {"File.FileEnd", Field, 20}, {"File.FileStart", Field, 20}, {"File.GoVersion", Field, 21}, {"File.Imports", Field, 0}, {"File.Name", Field, 0}, {"File.Package", Field, 0}, {"File.Scope", Field, 0}, {"File.Unresolved", Field, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)