Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for pkgScope (0.58 sec)

  1. src/go/ast/resolve.go

    					p.declare(fileScope, pkgScope, obj)
    				}
    			} else if name != "_" {
    				// declare imported package object in file scope
    				// (do not re-use pkg in the file scope but create
    				// a new object instead; the Decl field is different
    				// for different files)
    				obj := NewObj(Pkg, name)
    				obj.Decl = spec
    				obj.Data = pkg.Data
    				p.declare(fileScope, pkgScope, obj)
    			}
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  2. src/go/parser/resolver.go

    // resolution. tok is used to format position in error messages.
    func resolveFile(file *ast.File, handle *token.File, declErr func(token.Pos, string)) {
    	pkgScope := ast.NewScope(nil)
    	r := &resolver{
    		handle:   handle,
    		declErr:  declErr,
    		topScope: pkgScope,
    		pkgScope: pkgScope,
    		depth:    1,
    	}
    
    	for _, decl := range file.Decls {
    		ast.Walk(r, decl)
    	}
    
    	r.closeScope()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 12:56:53 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  3. src/go/printer/testdata/parser.go

    	lit string      // token literal
    
    	// Non-syntactic parser control
    	exprLev int // < 0: in control clause, >= 0: in expression
    
    	// 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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  4. src/go/internal/gcimporter/ureader.go

    func (r *reader) ident(marker pkgbits.SyncMarker) (*types.Package, string) {
    	r.Sync(marker)
    	return r.pkg(), r.String()
    }
    
    // pkgScope returns pkg.Scope().
    // If pkg is nil, it returns types.Universe instead.
    //
    // TODO(mdempsky): Remove after x/tools can depend on Go 1.19.
    func pkgScope(pkg *types.Package) *types.Scope {
    	if pkg != nil {
    		return pkg.Scope()
    	}
    	return types.Universe
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
Back to top