- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 274 for Fset (0.04 sec)
-
src/cmd/cover/cover_test.go
} // Check that directives that start with the name of top-level declarations // come before the beginning of the named declaration and after the end // of the previous declaration. fset := token.NewFileSet() astFile, err := parser.ParseFile(fset, testDirectives, output, 0) if err != nil { t.Fatal(err) } prevEnd := 0 for _, decl := range astFile.Decls { var name string switch d := decl.(type) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 07 16:54:28 UTC 2023 - 18.4K bytes - Viewed (0) -
src/go/types/api.go
// behavior if ignored. type Error struct { Fset *token.FileSet // file set for interpretation of Pos Pos token.Pos // error position Msg string // error message Soft bool // if set, error is "soft" // go116code is a future API, unexported as the set of error codes is large // and likely to change significantly during experimentation. Tools wishing
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 17.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go
"go/token" "go/types" "os" "strconv" "golang.org/x/tools/go/analysis" "golang.org/x/tools/internal/aliases" ) func TypeErrorEndPos(fset *token.FileSet, src []byte, start token.Pos) token.Pos { // Get the end position for the type error. offset, end := fset.PositionFor(start, false).Offset, start if offset >= len(src) { return end } if width := bytes.IndexAny(src[offset:], " \n,():;[]+-*"); width > 0 {
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/cmd/vendor/golang.org/x/tools/go/analysis/diagnostic.go
// which should be a constant, may be used to classify them. // It is primarily intended to make it easy to look up documentation. // // All Pos values are interpreted relative to Pass.Fset. If End is // provided, the diagnostic is specified to apply to the range between // Pos and End. type Diagnostic struct { Pos token.Pos End token.Pos // optional Category string // optional
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 2.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go
func (d *deadState) findLabels(stmt ast.Stmt) { switch x := stmt.(type) { default: log.Fatalf("%s: internal error in findLabels: unexpected statement %T", d.pass.Fset.Position(x.Pos()), x) case *ast.AssignStmt, *ast.BadStmt, *ast.DeclStmt, *ast.DeferStmt, *ast.EmptyStmt, *ast.ExprStmt, *ast.GoStmt, *ast.IncDecStmt, *ast.ReturnStmt, *ast.SendStmt:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 7.6K bytes - Viewed (0) -
src/go/internal/gcimporter/iimport.go
// name (name with subscript). tparamIndex: make(map[ident]*types.TypeParam), fake: fakeFileSet{ fset: fset, files: make(map[string]*fileInfo), }, } defer p.fake.setLines() // set lines for files in fset for i, pt := range predeclared { p.typCache[uint64(i)] = pt } // Special handling for "any", whose representation may be changed by the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.2K bytes - Viewed (0) -
src/cmd/cgo/ast.go
import ( "fmt" "go/ast" "go/format" "go/parser" "go/scanner" "go/token" "os" "strings" ) func parse(name string, src []byte, flags parser.Mode) *ast.File { ast1, err := parser.ParseFile(fset, name, src, flags) if err != nil { if list, ok := err.(scanner.ErrorList); ok { // If err is a scanner.ErrorList, its String will print just // the first error and then (+n more errors).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 07 16:54:27 UTC 2023 - 14.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/doc.go
reporting diagnostics and other information back to the driver. type Pass struct { Fset *token.FileSet Files []*ast.File OtherFiles []string IgnoredFiles []string Pkg *types.Package TypesInfo *types.Info ResultOf map[*Analyzer]interface{} Report func(Diagnostic) ... } The Fset, Files, Pkg, and TypesInfo fields provide the syntax trees,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 13.3K bytes - Viewed (0) -
src/cmd/fix/main_test.go
if testenv.HasCGO() { testenv.MustHaveGoBuild(t) // Really just 'go tool cgo', but close enough. // The reportCgoError hook is global, so we can't set it per-test // if we want to be able to run those tests in parallel. // Instead, simply set it to panic on error: the goroutine dump // from the panic should help us determine which test failed. prevReportCgoError := reportCgoError reportCgoError = func(err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 05:31:47 UTC 2024 - 3.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/structtag/structtag.go
if pos, ok := seen.Get(key, val, level); ok { alsoPos := pass.Fset.Position(pos) alsoPos.Column = 0 // Make the "also at" position relative to the current position, // to ensure that all warnings are unambiguous and correct. For // example, via anonymous struct fields, it's possible for the // two fields to be in different packages and directories. thisPos := pass.Fset.Position(field.Pos())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 8.8K bytes - Viewed (0)