Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ParenExpr (0.14 sec)

  1. src/go/printer/nodes.go

    			// pretend this is an *ast.ParenExpr and do nothing.
    			break
    		}
    		h4, h5, mp := walkBinary(l)
    		has4 = has4 || h4
    		has5 = has5 || h5
    		maxProblem = max(maxProblem, mp)
    	}
    
    	switch r := e.Y.(type) {
    	case *ast.BinaryExpr:
    		if r.Op.Precedence() <= e.Op.Precedence() {
    			// parens will be inserted.
    			// pretend this is an *ast.ParenExpr and do nothing.
    			break
    		}
    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

    		return p.parseMapType()
    	case token.CHAN, token.ARROW:
    		return p.parseChanType()
    	case token.LPAREN:
    		lparen := p.pos
    		p.next()
    		typ := p.parseType()
    		rparen := p.expect(token.RPAREN)
    		return &ast.ParenExpr{lparen, typ, rparen}
    	}
    
    	// no type found
    	return nil
    }
    
    func (p *parser) tryType() ast.Expr {
    	typ := p.tryIdentOrType(false)
    	if typ != nil {
    		p.resolve(typ)
    	}
    	return typ
    }
    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/compile/internal/syntax/parser.go

    	case *ArrayType, *StructType, *FuncType, *InterfaceType, *SliceType, *MapType, *ChanType:
    		return true
    	case *Operation:
    		return isTypeElem(x.X) || (x.Y != nil && isTypeElem(x.Y)) || x.Op == Tilde
    	case *ParenExpr:
    		return isTypeElem(x.X)
    	}
    	return false
    }
    
    // VarSpec = IdentifierList ( Type [ "=" ExpressionList ] | "=" ExpressionList ) .
    func (p *parser) varDecl(group *Group) Decl {
    	if trace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  4. src/go/parser/parser.go

    	case token.CHAN, token.ARROW:
    		return p.parseChanType()
    	case token.LPAREN:
    		lparen := p.pos
    		p.next()
    		typ := p.parseType()
    		rparen := p.expect(token.RPAREN)
    		return &ast.ParenExpr{Lparen: lparen, X: typ, Rparen: rparen}
    	}
    
    	// no type found
    	return nil
    }
    
    // ----------------------------------------------------------------------------
    // Blocks
    
    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/go/types/expr.go

    	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:
    		check.updateExprType0(x, x.X, typ, final)
    
    	case *ast.UnaryExpr:
    		// If x is a constant, the operands were constants.
    		// The operands don't need to be updated since they
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/expr.go

    		// An identifier denoting a constant, a constant literal,
    		// or a qualified identifier (imported untyped constant).
    		// No operands to take care of.
    
    	case *syntax.ParenExpr:
    		check.updateExprType0(x, x.X, typ, final)
    
    	// case *syntax.UnaryExpr:
    	// 	// If x is a constant, the operands were constants.
    	// 	// The operands don't need to be updated since they
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  7. src/cmd/cgo/gcc.go

    			"rune", "string",
    			"uint", "uint8", "uint16", "uint32", "uint64", "uintptr":
    
    			return true
    		}
    		if strings.HasPrefix(t.Name, "_Ctype_") {
    			return true
    		}
    	case *ast.ParenExpr:
    		return p.isType(t.X)
    	case *ast.StarExpr:
    		return p.isType(t.X)
    	case *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType,
    		*ast.MapType, *ast.ChanType:
    
    		return true
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 97K bytes
    - Viewed (0)
Back to top