Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 83 for parenthesized (0.5 sec)

  1. src/cmd/compile/internal/syntax/printer.go

    		}
    		// binary expressions
    		return combinesWithName(x.X) && !isTypeElem(x.Y)
    	case *ParenExpr:
    		// name(x) combines but we are making sure at
    		// the call site that x is never parenthesized.
    		panic("unexpected parenthesized expression")
    	}
    	return false
    }
    
    func (p *printer) printStmtList(list []Stmt, braces bool) {
    	for i, x := range list {
    		p.print(x, _Semi)
    		if i+1 < len(list) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/check.go

    			stv.SetAssignable()
    		}
    		if tv.HasOk() {
    			stv.SetHasOk()
    		}
    		x.SetTypeInfo(stv)
    	}
    }
    
    func (check *Checker) recordBuiltinType(f syntax.Expr, sig *Signature) {
    	// f must be a (possibly parenthesized, possibly qualified)
    	// identifier denoting a built-in (including unsafe's non-constant
    	// functions Add and Slice): record the signature for f and possible
    	// children.
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/parse.go

    	}
    
    	// Constant.
    	haveConstant := false
    	switch tok.ScanToken {
    	case scanner.Int, scanner.Float, scanner.String, scanner.Char, '+', '-', '~':
    		haveConstant = true
    	case '(':
    		// Could be parenthesized expression or (R). Must be something, though.
    		tok := p.next()
    		if tok.ScanToken == scanner.EOF {
    			p.errorf("missing right parenthesis")
    			return
    		}
    		rname := tok.String()
    		p.back()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 14:34:57 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/mod/modfile/read.go

    }
    
    // An LParen represents the beginning of a parenthesized line block.
    // It is a place to store suffix comments.
    type LParen struct {
    	Comments
    	Pos Position
    }
    
    func (x *LParen) Span() (start, end Position) {
    	return x.Pos, x.Pos.add(")")
    }
    
    // An RParen represents the end of a parenthesized line block.
    // It is a place to store whole-line (before) comments.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/parser.go

    			// *(T)
    			p.syntaxError("cannot parenthesize embedded type")
    			p.next()
    			typ = p.qualifiedName(nil)
    			p.got(_Rparen) // no need to complain if missing
    		} else {
    			// *T
    			typ = p.qualifiedName(nil)
    		}
    		tag := p.oliteral()
    		p.addField(styp, pos, nil, newIndirect(pos, typ), tag)
    
    	case _Lparen:
    		p.syntaxError("cannot parenthesize embedded type")
    		p.next()
    		var typ Expr
    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/vendor/golang.org/x/tools/go/ast/astutil/imports.go

    			continue
    		}
    		if first == nil {
    			first = gen
    			continue // Don't touch the first one.
    		}
    		// We now know there is more than one package in this import
    		// declaration. Ensure that it ends up parenthesized.
    		first.Lparen = first.Pos()
    		// Move the imports of the other import declaration to the first one.
    		for _, spec := range gen.Specs {
    			spec.(*ast.ImportSpec).Path.ValuePos = first.Pos()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 10 21:56:21 UTC 2022
    - 13.4K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    		return "key/value association"
    	case *ast.LabeledStmt:
    		return "statement label"
    	case *ast.MapType:
    		return "map type"
    	case *ast.Package:
    		return "package"
    	case *ast.ParenExpr:
    		return "parenthesized " + NodeDescription(n.X)
    	case *ast.RangeStmt:
    		return "range loop"
    	case *ast.ReturnStmt:
    		return "return statement"
    	case *ast.SelectStmt:
    		return "select statement"
    	case *ast.SelectorExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  8. src/go/build/constraint/expr.go

    		p.lex()
    		if p.tok == "!" {
    			panic(&SyntaxError{Offset: p.pos, Err: "double negation not allowed"})
    		}
    		return not(p.atom())
    	}
    	return p.atom()
    }
    
    // atom parses a tag or a parenthesized expression.
    // On entry, the next input token HAS been lexed.
    // On exit, the next input token has been lexed and is in p.tok.
    func (p *exprParser) atom() Expr {
    	// first token already in p.tok
    	if p.tok == "(" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  9. src/go/parser/parser.go

    		x := &ast.BasicLit{ValuePos: p.pos, Kind: p.tok, Value: p.lit}
    		p.next()
    		return x
    
    	case token.LPAREN:
    		lparen := p.pos
    		p.next()
    		p.exprLev++
    		x := p.parseRhs() // types may be parenthesized: (some type)
    		p.exprLev--
    		rparen := p.expect(token.RPAREN)
    		return &ast.ParenExpr{Lparen: lparen, X: x, Rparen: rparen}
    
    	case token.FUNC:
    		return p.parseFuncTypeOrLit()
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/typexpr.go

    		return check.instantiatedType(e.X, syntax.UnpackListExpr(e.Index), def)
    
    	case *syntax.ParenExpr:
    		// Generic types must be instantiated before they can be used in any form.
    		// Consequently, generic types cannot be parenthesized.
    		return check.definedType(e.X, def)
    
    	case *syntax.ArrayType:
    		typ := new(Array)
    		setDefType(def, typ)
    		if e.Len != nil {
    			typ.len = check.arrayLength(e.Len)
    		} else {
    			// [...]array
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
Back to top