Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ObjKind (0.14 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
Back to top