Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for SelectorExpr (0.17 sec)

  1. src/go/printer/nodes.go

    	if x, ok := expr.(*ast.SelectorExpr); ok {
    		return p.selectorExpr(x, depth, true)
    	}
    	p.expr1(expr, prec1, depth)
    	return false
    }
    
    // selectorExpr handles an *ast.SelectorExpr node and reports whether x spans
    // multiple lines.
    func (p *printer) selectorExpr(x *ast.SelectorExpr, depth int, isMethod bool) bool {
    	p.expr1(x.X, token.HighestPrec, depth)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  2. src/go/printer/testdata/parser.go

    	// don't resolve ident yet - it may be a parameter or field name
    
    	if p.tok == token.PERIOD {
    		// ident is a package name
    		p.next()
    		p.resolve(ident)
    		sel := p.parseIdent()
    		return &ast.SelectorExpr{ident, sel}
    	}
    
    	return ident
    }
    
    func (p *parser) parseArrayType(ellipsisOk bool) ast.Expr {
    	if p.trace {
    		defer un(trace(p, "ArrayType"))
    	}
    
    	lbrack := p.expect(token.LBRACK)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  3. src/cmd/cgo/gcc.go

    	// This is a call to C.xxx; set goname to "xxx".
    	// It may have already been mangled by rewriteName.
    	var goname string
    	switch fun := call.Call.Fun.(type) {
    	case *ast.SelectorExpr:
    		goname = fun.Sel.Name
    	case *ast.Ident:
    		goname = strings.TrimPrefix(fun.Name, "_C2func_")
    		goname = strings.TrimPrefix(goname, "_Cfunc_")
    	}
    	if goname == "" || goname == "malloc" {
    		return "", false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 97K bytes
    - Viewed (0)
  4. src/go/parser/parser.go

    	}
    
    	if ident == nil {
    		ident = p.parseIdent()
    	}
    
    	if p.tok == token.PERIOD {
    		// ident is a package name
    		p.next()
    		sel := p.parseIdent()
    		return &ast.SelectorExpr{X: ident, Sel: sel}
    	}
    
    	return ident
    }
    
    // "[" has already been consumed, and lbrack is its position.
    // If len != nil it is the already consumed array length.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/parser.go

    		x = p.operand(keep_parens)
    	}
    
    loop:
    	for {
    		pos := p.pos()
    		switch p.tok {
    		case _Dot:
    			p.next()
    			switch p.tok {
    			case _Name:
    				// pexpr '.' sym
    				t := new(SelectorExpr)
    				t.pos = pos
    				t.X = x
    				t.Sel = p.name()
    				x = t
    
    			case _Lparen:
    				p.next()
    				if p.got(_Type) {
    					t := new(TypeSwitchGuard)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/api_test.go

    func (r *N[C]) n() {  }
    `
    	f := mustParse(src)
    	info := Info{
    		Defs:       make(map[*syntax.Name]Object),
    		Uses:       make(map[*syntax.Name]Object),
    		Selections: make(map[*syntax.SelectorExpr]*Selection),
    	}
    	var conf Config
    	pkg, err := conf.Check("p", []*syntax.File{f}, &info)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	N := pkg.Scope().Lookup("N").Type().(*Named)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
  7. src/go/types/api_test.go

    func (r *N[C]) n() {  }
    `
    	fset := token.NewFileSet()
    	f := mustParse(fset, src)
    	info := Info{
    		Defs:       make(map[*ast.Ident]Object),
    		Uses:       make(map[*ast.Ident]Object),
    		Selections: make(map[*ast.SelectorExpr]*Selection),
    	}
    	var conf Config
    	pkg, err := conf.Check("p", fset, []*ast.File{f}, &info)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	N := pkg.Scope().Lookup("N").Type().(*Named)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
  8. src/go/types/expr.go

    		// Resulting in an untyped constant (e.g., built-in complex).
    		// The respective calls take care of calling updateExprType
    		// for the arguments if necessary.
    
    	case *ast.Ident, *ast.BasicLit, *ast.SelectorExpr:
    		// An identifier denoting a constant, a constant literal,
    		// or a qualified identifier (imported untyped constant).
    		// No operands to take care of.
    
    	case *ast.ParenExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/expr.go

    		// Resulting in an untyped constant (e.g., built-in complex).
    		// The respective calls take care of calling updateExprType
    		// for the arguments if necessary.
    
    	case *syntax.Name, *syntax.BasicLit, *syntax.SelectorExpr:
    		// An identifier denoting a constant, a constant literal,
    		// or a qualified identifier (imported untyped constant).
    		// No operands to take care of.
    
    	case *syntax.ParenExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  10. src/cmd/cgo/out.go

    		}
    		if r, ok := goTypes[t.Name]; ok {
    			return goTypesFixup(r)
    		}
    		error_(e.Pos(), "unrecognized Go type %s", t.Name)
    		return &Type{Size: 4, Align: 4, C: c("int")}
    	case *ast.SelectorExpr:
    		id, ok := t.X.(*ast.Ident)
    		if ok && id.Name == "unsafe" && t.Sel.Name == "Pointer" {
    			return &Type{Size: p.PtrSize, Align: p.PtrSize, C: c("void*")}
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:10 UTC 2024
    - 59.6K bytes
    - Viewed (0)
Back to top