Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for FileStart (0.17 sec)

  1. src/runtime/metrics/description_test.go

    	}
    	if updated {
    		fmt.Fprintf(os.Stderr, "go test -generate: writing new doc.go\n")
    		var buf bytes.Buffer
    		buf.Write(src[:fdoc.Pos()-f.FileStart])
    		buf.WriteString("/*\n")
    		buf.Write(new(comment.Printer).Comment(doc))
    		buf.WriteString("*/")
    		buf.Write(src[fdoc.End()-f.FileStart:])
    		src, err := format.Source(buf.Bytes())
    		if err != nil {
    			t.Fatal(err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 20 22:54:22 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  2. 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)
  3. src/go/ast/example_test.go

    	//     43  .  .  .  .  .  .  }
    	//     44  .  .  .  .  .  }
    	//     45  .  .  .  .  }
    	//     46  .  .  .  .  Rbrace: 5:1
    	//     47  .  .  .  }
    	//     48  .  .  }
    	//     49  .  }
    	//     50  .  FileStart: 1:1
    	//     51  .  FileEnd: 5:3
    	//     52  .  Scope: *ast.Scope {
    	//     53  .  .  Objects: map[string]*ast.Object (len = 1) {
    	//     54  .  .  .  "main": *(obj @ 11)
    	//     55  .  .  }
    	//     56  .  }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:44:50 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top