Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for ObjKind (0.1 sec)

  1. src/go/ast/scope.go

    				return ident.Pos()
    			}
    		}
    	case *Scope:
    		// predeclared object - nothing to do for now
    	}
    	return token.NoPos
    }
    
    // ObjKind describes what an [Object] represents.
    type ObjKind int
    
    // The list of possible [Object] kinds.
    const (
    	Bad ObjKind = iota // for error handling
    	Pkg                // package
    	Con                // constant
    	Typ                // type
    	Var                // variable
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. src/go/parser/resolver.go

    		}
    	}
    	// pop label scope
    	r.targetStack = r.targetStack[0:n]
    	r.labelScope = r.labelScope.Outer
    }
    
    func (r *resolver) declare(decl, data any, scope *ast.Scope, kind ast.ObjKind, idents ...*ast.Ident) {
    	for _, ident := range idents {
    		if ident.Obj != nil {
    			panic(fmt.Sprintf("%v: identifier %s already declared or resolved", ident.Pos(), ident.Name))
    		}
    		obj := ast.NewObj(kind, ident.Name)
    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. operator/cmd/mesh/test-util_test.go

    	return nil
    }
    
    // kind returns a subset of o where kind matches the given value.
    func (o *ObjectSet) kind(kind string) *ObjectSet {
    	ret := &ObjectSet{}
    	for k, v := range o.objMap {
    		objKind, _, _ := object.FromHash(k)
    		if objKind == kind {
    			ret.append(v)
    		}
    	}
    	return ret
    }
    
    // labels returns a subset of o where the object's labels match all the given labels.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  4. src/go/internal/gcimporter/gcimporter_test.go

    	}
    
    	t.Logf("tested %d imports", nimports)
    }
    
    var importedObjectTests = []struct {
    	name string
    	want string
    }{
    	// non-interfaces
    	{"crypto.Hash", "type Hash uint"},
    	{"go/ast.ObjKind", "type ObjKind int"},
    	{"go/types.Qualifier", "type Qualifier func(*Package) string"},
    	{"go/types.Comparable", "func Comparable(T Type) bool"},
    	{"math.Pi", "const Pi untyped float"},
    	{"math.Sin", "func Sin(x float64) float64"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  5. src/go/parser/parser_test.go

    const pi = 3.14
    type T struct{}
    var x int
    func f() { L: }
    `
    
    	f, err := ParseFile(token.NewFileSet(), "", src, 0)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	objects := map[string]ast.ObjKind{
    		"p":   ast.Bad, // not in a scope
    		"fmt": ast.Bad, // not resolved yet
    		"pi":  ast.Con,
    		"T":   ast.Typ,
    		"x":   ast.Var,
    		"int": ast.Bad, // not resolved yet
    		"f":   ast.Fun,
    		"L":   ast.Lbl,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  6. src/go/printer/testdata/parser.go

    		}
    	}
    	// pop label scope
    	p.targetStack = p.targetStack[0:n]
    	p.labelScope = p.labelScope.Outer
    }
    
    func (p *parser) declare(decl any, scope *ast.Scope, kind ast.ObjKind, idents ...*ast.Ident) {
    	for _, ident := range idents {
    		assert(ident.Obj == nil, "identifier already declared or resolved")
    		if ident.Name != "_" {
    			obj := ast.NewObj(kind, ident.Name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  7. api/go1.txt

    pkg fmt, type Stringer interface, String() string
    pkg go/ast, const Bad ObjKind
    pkg go/ast, const Con ObjKind
    pkg go/ast, const FilterFuncDuplicates MergeMode
    pkg go/ast, const FilterImportDuplicates MergeMode
    pkg go/ast, const FilterUnassociatedComments MergeMode
    pkg go/ast, const Fun ObjKind
    pkg go/ast, const Lbl ObjKind
    pkg go/ast, const Pkg ObjKind
    pkg go/ast, const RECV ChanDir
    pkg go/ast, const SEND ChanDir
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*ValueSpec).Pos", Method, 0},
    		{"(CommentMap).Comments", Method, 1},
    		{"(CommentMap).Filter", Method, 1},
    		{"(CommentMap).String", Method, 1},
    		{"(CommentMap).Update", Method, 1},
    		{"(ObjKind).String", Method, 0},
    		{"ArrayType", Type, 0},
    		{"ArrayType.Elt", Field, 0},
    		{"ArrayType.Lbrack", Field, 0},
    		{"ArrayType.Len", Field, 0},
    		{"AssignStmt", Type, 0},
    		{"AssignStmt.Lhs", 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