- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 37 for ImportSpec (0.25 sec)
-
src/go/ast/filter.go
for _, d := range decls { if d != nil { decls[i] = d i++ } } decls = decls[0:i] } } // Collect import specs from all package files. var imports []*ImportSpec if mode&FilterImportDuplicates != 0 { seen := make(map[string]bool) for _, filename := range filenames { f := pkg.Files[filename] for _, imp := range f.Imports {
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/ast/astutil/rewrite.go
case *ast.RangeStmt: a.apply(n, "Key", nil, n.Key) a.apply(n, "Value", nil, n.Value) a.apply(n, "X", nil, n.X) a.apply(n, "Body", nil, n.Body) // Declarations case *ast.ImportSpec: a.apply(n, "Doc", nil, n.Doc) a.apply(n, "Name", nil, n.Name) a.apply(n, "Path", nil, n.Path) a.apply(n, "Comment", nil, n.Comment) case *ast.ValueSpec: a.apply(n, "Doc", nil, n.Doc)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 12.2K bytes - Viewed (0) -
src/go/types/api_test.go
continue } // extract Implicits entry, if any var got string for n, obj := range info.Implicits { switch x := n.(type) { case *ast.ImportSpec: got = "importSpec" case *ast.CaseClause: got = "caseClause" case *ast.Field: got = "field" default: t.Fatalf("package %s: unexpected %T", name, x) } got += ": " + obj.String()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 94.2K bytes - Viewed (0) -
src/go/printer/testdata/parser.go
// Ordinary identifier scopes pkgScope *ast.Scope // pkgScope.Outer == nil topScope *ast.Scope // top-most scope; may be pkgScope unresolved []*ast.Ident // unresolved identifiers imports []*ast.ImportSpec // list of imports // Label scope // (maintained by open/close LabelScope) labelScope *ast.Scope // label scope for current function targetStack [][]*ast.Ident // stack of unresolved labels }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.5K bytes - Viewed (0) -
src/go/build/read.go
} hasEmbed := false for _, decl := range info.parsed.Decls { d, ok := decl.(*ast.GenDecl) if !ok { continue } for _, dspec := range d.Specs { spec, ok := dspec.(*ast.ImportSpec) if !ok { continue } quoted := spec.Path.Value path, err := strconv.Unquote(quoted) if err != nil { return fmt.Errorf("parser returned invalid quoted string: <%s>", quoted) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 14.1K bytes - Viewed (0) -
src/go/printer/printer.go
return } // getDoc returns the ast.CommentGroup associated with n, if any. func getDoc(n ast.Node) *ast.CommentGroup { switch n := n.(type) { case *ast.Field: return n.Doc case *ast.ImportSpec: return n.Doc case *ast.ValueSpec: return n.Doc case *ast.TypeSpec: return n.Doc case *ast.GenDecl: return n.Doc case *ast.FuncDecl: return n.Doc case *ast.File:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 41.6K bytes - Viewed (0) -
src/go/parser/parser.go
// Non-syntactic parser control exprLev int // < 0: in control clause, >= 0: in expression inRhs bool // if set, the parser is parsing a rhs expression imports []*ast.ImportSpec // list of imports // nestLev is used to track and limit the recursion depth // during parsing. nestLev int } func (p *parser) init(fset *token.FileSet, filename string, src []byte, mode Mode) {
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/go/doc/reader.go
switch d := decl.(type) { case *ast.GenDecl: switch d.Tok { case token.IMPORT: // imports are handled individually for _, spec := range d.Specs { if s, ok := spec.(*ast.ImportSpec); ok { if import_, err := strconv.Unquote(s.Path.Value); err == nil { r.imports[import_] = 1 var name string if s.Name != nil { name = s.Name.Name if 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/go/internal/load/pkg.go
} return data.p, data.err }) return p, loaded, err } // importSpec describes an import declaration in source code. It is used as a // cache key for resolvedImportCache. type importSpec struct { path string parentPath, parentDir, parentRoot string parentIsStd bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 28 17:00:51 UTC 2024 - 120K bytes - Viewed (0) -
src/cmd/compile/internal/types2/api_test.go
{`package p2; import . "fmt"; var _ = Println`, ""}, // no Implicits entry {`package p0; import local "fmt"; var _ = local.Println`, ""}, // no Implicits entry {`package p1; import "fmt"; var _ = fmt.Println`, "importSpec: package fmt"}, {`package p3; func f(x interface{}) { switch x.(type) { case int: } }`, ""}, // no Implicits entry {`package p4; func f(x interface{}) { switch t := x.(type) { case int: _ = t } }`, "caseClause: var t int"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 93.3K bytes - Viewed (0)