- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for LPAREN (0.16 sec)
-
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) -
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) -
src/go/ast/example_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0) -
src/go/doc/example.go
if d.Doc != nil { comments = append(comments, d.Doc) } } } // Synthesize import declaration. importDecl := &ast.GenDecl{ Tok: token.IMPORT, Lparen: 1, // Need non-zero Lparen and Rparen so that printer Rparen: 1, // treats this as a factored import. } importDecl.Specs = append(namedImports, blankImports...) // Synthesize main function. funcDecl := &ast.FuncDecl{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 21.4K bytes - Viewed (0) -
src/go/ast/import.go
for _, d := range f.Decls { d, ok := d.(*GenDecl) if !ok || d.Tok != token.IMPORT { // Not an import declaration, so we're done. // Imports are always first. break } if !d.Lparen.IsValid() { // Not a block: sorted by default. continue } // Identify and sort runs of specs on successive lines. i := 0 specs := d.Specs[:0] for j, s := range d.Specs {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5.7K bytes - Viewed (0) -
src/go/printer/printer_test.go
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 )" fset := token.NewFileSet()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/go/doc/reader.go
} case token.CONST, token.VAR: // constants and variables are always handled as a group r.readValue(d) case token.TYPE: // types are handled individually if len(d.Specs) == 1 && !d.Lparen.IsValid() { // common case: single declaration w/o parentheses // (if a single declaration is parenthesized, // create a new fake declaration below, so that // go/doc type declarations always appear w/o
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 27.5K bytes - Viewed (0) -
src/go/types/call.go
ix := typeparams.UnpackIndexExpr(call.Fun) check.versionErrorf(inNode(call.Fun, ix.Lbrack), go1_18, "function instantiation") default: check.versionErrorf(inNode(call, call.Lparen), go1_18, "implicit function instantiation") } } // rename type parameters to avoid problems with recursive calls var tmp Type tparams, tmp = check.renameTParams(call.Pos(), sig.TypeParams().list(), sigParams)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 33.5K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
break } } return } call, ok := (*px).(*ast.CallExpr) if !ok { return } for _, c := range f.Calls { if !c.Done && c.Call.Lparen == call.Lparen { cstr, nu := p.rewriteCall(f, c) if cstr != "" { // Smuggle the rewritten call through an ident. *px = ast.NewIdent(cstr) if nu { needsUnsafe = true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0)