Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,030 for Rparen (0.13 sec)

  1. src/cmd/vendor/golang.org/x/mod/modfile/read.go

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

    	case token.MAP:
    		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: lparen, X: typ, Rparen: rparen}
    	}
    
    	// no type found
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  3. src/go/ast/import.go

    		d.Specs = specs
    
    		// Deduping can leave a blank line before the rparen; clean that up.
    		if len(d.Specs) > 0 {
    			lastSpec := d.Specs[len(d.Specs)-1]
    			lastLine := lineAt(fset, lastSpec.Pos())
    			rParenLine := lineAt(fset, d.Rparen)
    			for rParenLine > lastLine+1 {
    				rParenLine--
    				fset.File(d.Rparen).MergeLine(rParenLine)
    			}
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. src/go/token/token.go

    	EQL    // ==
    	LSS    // <
    	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
    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/go/printer/testdata/parser.go

    	if p.trace {
    		defer un(trace(p, "Parameters"))
    	}
    
    	var params []*ast.Field
    	lparen := p.expect(token.LPAREN)
    	if p.tok != token.RPAREN {
    		params = p.parseParameterList(scope, ellipsisOk)
    	}
    	rparen := p.expect(token.RPAREN)
    
    	return &ast.FieldList{lparen, params, rparen}
    }
    
    func (p *parser) parseResult(scope *ast.Scope) *ast.FieldList {
    	if p.trace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.5K bytes
    - Viewed (0)
  6. src/go/printer/nodes.go

    		// types require parentheses around the type.
    		paren := false
    		switch t := x.Fun.(type) {
    		case *ast.FuncType:
    			paren = true
    		case *ast.ChanType:
    			paren = t.Dir == ast.RECV
    		}
    		if paren {
    			p.print(token.LPAREN)
    		}
    		wasIndented := p.possibleSelectorExpr(x.Fun, token.HighestPrec, depth)
    		if paren {
    			p.print(token.RPAREN)
    		}
    
    		p.setPos(x.Lparen)
    		p.print(token.LPAREN)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  7. src/go/ast/ast.go

    							return gen, true
    						}
    					}
    				}
    			}
    		}
    	}
    	return "", false
    }
    
    // Unparen returns the expression with any enclosing parentheses removed.
    func Unparen(e Expr) Expr {
    	for {
    		paren, ok := e.(*ParenExpr)
    		if !ok {
    			return e
    		}
    		e = paren.X
    	}
    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/cmd/vendor/golang.org/x/mod/modfile/print.go

    	case *CommentBlock:
    		// done
    
    	case *LParen:
    		p.printf("(")
    	case *RParen:
    		p.printf(")")
    
    	case *Line:
    		p.tokens(x.Token)
    
    	case *LineBlock:
    		p.tokens(x.Token)
    		p.printf(" ")
    		p.expr(&x.LParen)
    		p.margin++
    		for _, l := range x.Line {
    			p.newline()
    			p.expr(l)
    		}
    		p.margin--
    		p.newline()
    		p.expr(&x.RParen)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 00:48:59 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  9. src/go/types/generate_test.go

    					if isIdent(n.Args[0], "pos") {
    						pos := n.Args[0].Pos()
    						fun := &ast.SelectorExpr{X: newIdent(pos, "posn"), Sel: newIdent(pos, "Pos")}
    						arg := &ast.CallExpr{Fun: fun, Lparen: pos, Args: nil, Ellipsis: token.NoPos, Rparen: pos}
    						n.Args[0] = arg
    						return false
    					}
    				case "addf":
    					// rewrite err.addf(pos, ...) to err.addf(posn, ...)
    					if isIdent(n.Args[0], "pos") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  10. src/go/types/util.go

    func dddErrPos(call *ast.CallExpr) positioner { return atPos(call.Ellipsis) }
    
    // argErrPos returns positioner for reporting an invalid argument count.
    func argErrPos(call *ast.CallExpr) positioner { return inNode(call, call.Rparen) }
    
    // startPos returns the start position of node n.
    func startPos(n ast.Node) token.Pos { return n.Pos() }
    
    // endPos returns the position of the first character immediately after node n.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 1.7K bytes
    - Viewed (0)
Back to top