- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for fileExports (0.32 sec)
-
src/go/doc/exports.go
// thus, removing these methods early will not lead // to the false removal of possible conflicts return token.IsExported(d.Name.Name) } return false } // fileExports removes unexported declarations from src in place. func (r *reader) fileExports(src *ast.File) { j := 0 for _, d := range src.Decls { if r.filterDecl(d) { src.Decls[j] = d j++ } } src.Decls = src.Decls[0:j]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 01 18:18:07 UTC 2022 - 8.5K bytes - Viewed (0) -
src/go/ast/filter.go
return IsExported(name) } // FileExports trims the AST for a Go source file in place such that // only exported nodes remain: all top-level identifiers which are not exported // and their associated information (such as type, initial value, or function // body) are removed. Non-exported fields and methods of exported types are // stripped. The [File.Comments] list is not changed. // // FileExports reports whether there are exported declarations.
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/go/printer/printer_test.go
f, err := parser.ParseFile(fset, "", src, parser.ParseComments) if err != nil { return nil, fmt.Errorf("parse: %s\n%s", err, src) } // filter exports if necessary if mode&export != 0 { ast.FileExports(f) // ignore result f.Comments = nil // don't print comments that are not in AST } // determine printer configuration cfg := Config{Tabwidth: tabwidth} if mode&rawFormat != 0 { cfg.Mode |= RawFormat
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/go/parser/parser_test.go
checkFieldComments(t, f, "T.f5", "", "// f5 line comment") checkFieldComments(t, f, "T.f6", "", "/* f6 line comment */") checkFieldComments(t, f, "T.f7", "", "/*f7a*//*f7b*///f7c") ast.FileExports(f) checkFieldComments(t, f, "T.F1", "/* F1 lead comment *///", "/* F1 */// line comment") checkFieldComments(t, f, "T.F2", "// F2 lead// comment", "// F2 line comment") if getField(f, "T.f3") != nil {
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/go/doc/reader.go
r.filenames[i] = filename i++ } slices.Sort(r.filenames) // process files in sorted order for _, filename := range r.filenames { f := pkg.Files[filename] if mode&AllDecls == 0 { r.fileExports(f) } r.readFile(f) } for name, path := range r.importByName { if path == "" { delete(r.importByName, name) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 27.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"File.GoVersion", Field, 21}, {"File.Imports", Field, 0}, {"File.Name", Field, 0}, {"File.Package", Field, 0}, {"File.Scope", Field, 0}, {"File.Unresolved", Field, 0}, {"FileExports", Func, 0}, {"Filter", Type, 0}, {"FilterDecl", Func, 0}, {"FilterFile", Func, 0}, {"FilterFuncDuplicates", Const, 0}, {"FilterImportDuplicates", Const, 0}, {"FilterPackage", Func, 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) -
api/go1.txt
pkg go/ast, const Lbl ObjKind pkg go/ast, const Pkg ObjKind pkg go/ast, const RECV ChanDir pkg go/ast, const SEND ChanDir pkg go/ast, const Typ ObjKind pkg go/ast, const Var ObjKind pkg go/ast, func FileExports(*File) bool pkg go/ast, func FilterDecl(Decl, Filter) bool pkg go/ast, func FilterFile(*File, Filter) bool pkg go/ast, func FilterPackage(*Package, Filter) bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)