Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 306 for Rbrack (0.28 sec)

  1. src/go/internal/typeparams/typeparams.go

    )
    
    func PackIndexExpr(x ast.Expr, lbrack token.Pos, exprs []ast.Expr, rbrack token.Pos) ast.Expr {
    	switch len(exprs) {
    	case 0:
    		panic("internal error: PackIndexExpr with empty expr slice")
    	case 1:
    		return &ast.IndexExpr{
    			X:      x,
    			Lbrack: lbrack,
    			Index:  exprs[0],
    			Rbrack: rbrack,
    		}
    	default:
    		return &ast.IndexListExpr{
    			X:       x,
    			Lbrack:  lbrack,
    			Indices: exprs,
    			Rbrack:  rbrack,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go

    // will panic.
    func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) ast.Expr {
    	switch len(indices) {
    	case 0:
    		panic("empty indices")
    	case 1:
    		return &ast.IndexExpr{
    			X:      x,
    			Lbrack: lbrack,
    			Index:  indices[0],
    			Rbrack: rbrack,
    		}
    	default:
    		return &ast.IndexListExpr{
    			X:       x,
    			Lbrack:  lbrack,
    			Indices: indices,
    			Rbrack:  rbrack,
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. src/go/parser/parser.go

    				index[2] = &ast.BadExpr{From: colons[1] + 1, To: rbrack}
    			}
    		}
    		return &ast.SliceExpr{X: x, Lbrack: lbrack, Low: index[0], High: index[1], Max: index[2], Slice3: slice3, Rbrack: rbrack}
    	}
    
    	if len(args) == 0 {
    		// index expression
    		return &ast.IndexExpr{X: x, Lbrack: lbrack, Index: index[0], Rbrack: rbrack}
    	}
    
    	// instance expression
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  4. src/go/token/token.go

    	GTR    // >
    	ASSIGN // =
    	NOT    // !
    
    	NEQ      // !=
    	LEQ      // <=
    	GEQ      // >=
    	DEFINE   // :=
    	ELLIPSIS // ...
    
    	LPAREN // (
    	LBRACK // [
    	LBRACE // {
    	COMMA  // ,
    	PERIOD // .
    
    	RPAREN    // )
    	RBRACK    // ]
    	RBRACE    // }
    	SEMICOLON // ;
    	COLON     // :
    	operator_end
    
    	keyword_beg
    	// Keywords
    	BREAK
    	CASE
    	CHAN
    	CONST
    	CONTINUE
    
    	DEFAULT
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    		children = append(children,
    			tok(n.TokPos, len(n.Tok.String())))
    
    	case *ast.IndexExpr:
    		children = append(children,
    			tok(n.Lbrack, len("[")),
    			tok(n.Rbrack, len("]")))
    
    	case *ast.IndexListExpr:
    		children = append(children,
    			tok(n.Lbrack, len("[")),
    			tok(n.Rbrack, len("]")))
    
    	case *ast.InterfaceType:
    		children = append(children,
    			tok(n.Interface, len("interface")))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  6. src/go/printer/testdata/parser.go

    	p.closeScope()
    	rbrace := p.expect(token.RBRACE)
    
    	return &ast.BlockStmt{lbrace, list, rbrace}
    }
    
    func (p *parser) parseBlockStmt() *ast.BlockStmt {
    	if p.trace {
    		defer un(trace(p, "BlockStmt"))
    	}
    
    	lbrace := p.expect(token.LBRACE)
    	p.openScope()
    	list := p.parseStmtList()
    	p.closeScope()
    	rbrace := p.expect(token.RBRACE)
    
    	return &ast.BlockStmt{lbrace, list, rbrace}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  7. src/go/ast/ast.go

    func (x *CompositeLit) End() token.Pos   { return x.Rbrace + 1 }
    func (x *ParenExpr) End() token.Pos      { return x.Rparen + 1 }
    func (x *SelectorExpr) End() token.Pos   { return x.Sel.End() }
    func (x *IndexExpr) End() token.Pos      { return x.Rbrack + 1 }
    func (x *IndexListExpr) End() token.Pos  { return x.Rbrack + 1 }
    func (x *SliceExpr) End() token.Pos      { return x.Rbrack + 1 }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  8. src/go/printer/nodes.go

    		p.setPos(x.Lbrack)
    		p.print(token.LBRACK)
    		p.expr0(x.Index, depth+1)
    		p.setPos(x.Rbrack)
    		p.print(token.RBRACK)
    
    	case *ast.IndexListExpr:
    		// TODO(gri): as for IndexExpr, should treat [] like parentheses and undo
    		// one level of depth
    		p.expr1(x.X, token.HighestPrec, 1)
    		p.setPos(x.Lbrack)
    		p.print(token.LBRACK)
    		p.exprList(x.Lbrack, x.Indices, depth+1, commaTerm, x.Rbrack, false)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  9. api/go1.18.txt

    pkg go/ast, type FuncType struct, TypeParams *FieldList
    pkg go/ast, type IndexListExpr struct
    pkg go/ast, type IndexListExpr struct, Indices []Expr
    pkg go/ast, type IndexListExpr struct, Lbrack token.Pos
    pkg go/ast, type IndexListExpr struct, Rbrack token.Pos
    pkg go/ast, type IndexListExpr struct, X Expr
    pkg go/ast, type TypeSpec struct, TypeParams *FieldList
    pkg go/constant, method (Kind) String() string
    pkg go/token, const TILDE = 88
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 13K bytes
    - Viewed (0)
  10. src/go/types/index.go

    		x.mode = invalid
    		return
    	}
    
    	x.mode = value
    
    	// spec: "Only the first index may be omitted; it defaults to 0."
    	if e.Slice3 && (e.High == nil || e.Max == nil) {
    		check.error(inNode(e, e.Rbrack), InvalidSyntaxTree, "2nd and 3rd index required in 3-index slice")
    		x.mode = invalid
    		return
    	}
    
    	// check indices
    	var ind [3]int64
    	for i, expr := range []ast.Expr{e.Low, e.High, e.Max} {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
Back to top