Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 45 for parenthesized (0.37 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. src/go/types/typexpr.go

    		return check.instantiatedType(ix, def)
    
    	case *ast.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 *ast.ArrayType:
    		if e.Len == nil {
    			typ := new(Slice)
    			setDefType(def, typ)
    			typ.elem = check.varType(e.Elt)
    			return typ
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  7. src/go/printer/printer_test.go

    	_, err = parser.ParseFile(fset, "", got, 0)
    	if err != nil {
    		t.Errorf("%v\norig: %q\ngot : %q", err, src, got)
    	}
    }
    
    // If a declaration has multiple specifications, a parenthesized
    // declaration must be printed even if Lparen is token.NoPos.
    func TestParenthesizedDecl(t *testing.T) {
    	// a package with multiple specs in a single declaration
    	const src = "package p; var ( a float64; b int )"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  8. doc/go1.17_spec.html

    must be <a href="#Uniqueness_of_identifiers">unique</a>.
    If absent, each type stands for one item of that type.
    Parameter and result
    lists are always parenthesized except that if there is exactly
    one unnamed result it may be written as an unparenthesized type.
    </p>
    
    <p>
    The final incoming parameter in a function signature may have
    a type prefixed with <code>...</code>.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  9. src/text/template/parse/parse.go

    	case itemCharConstant, itemComplex, itemNumber:
    		number, err := t.newNumber(token.pos, token.val, token.typ)
    		if err != nil {
    			t.error(err)
    		}
    		return number
    	case itemLeftParen:
    		return t.pipeline("parenthesized pipeline", itemRightParen)
    	case itemString, itemRawString:
    		s, err := strconv.Unquote(token.val)
    		if err != nil {
    			t.error(err)
    		}
    		return t.newString(token.pos, token.val, s)
    	}
    	t.backup()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 21.3K bytes
    - Viewed (0)
  10. src/go/doc/example.go

    						ast.Inspect(val, inspectFunc)
    					}
    				}
    			}
    		}
    	}
    
    	// Some decls include multiple specs, such as a variable declaration with
    	// multiple variables on the same line, or a parenthesized declaration. Trim
    	// the declarations to include only the specs that are actually mentioned.
    	// However, if there is a constant group with iota, leave it all: later
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
Back to top