Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 104 for Semicolons (0.14 sec)

  1. src/go/printer/nodes.go

    	needsBlank := false
    	if init == nil && post == nil {
    		// no semicolons required
    		if expr != nil {
    			p.expr(stripParens(expr))
    			needsBlank = true
    		}
    	} else {
    		// all semicolons required
    		// (they are not separators, print them explicitly)
    		if init != nil {
    			p.stmt(init, false)
    		}
    		p.print(token.SEMICOLON, blank)
    		if expr != nil {
    			p.expr(stripParens(expr))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  2. src/go/types/issues_test.go

    	}
    }
    
    func TestIssue25627(t *testing.T) {
    	const prefix = `package p; import "unsafe"; type P *struct{}; type I interface{}; type T `
    	// The src strings (without prefix) are constructed such that the number of semicolons
    	// plus one corresponds to the number of fields expected in the respective struct.
    	for _, src := range []string{
    		`struct { x Missing }`,
    		`struct { Missing }`,
    		`struct { *Missing }`,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  3. doc/go1.17_spec.html

    may trigger the insertion of a <a href="#Semicolons">semicolon</a>.
    While breaking the input into tokens,
    the next token is the longest sequence of characters that form a
    valid token.
    </p>
    
    <h3 id="Semicolons">Semicolons</h3>
    
    <p>
    The formal grammar uses semicolons <code>";"</code> as terminators in
    a number of productions. Go programs may omit most of these semicolons
    using the following two rules:
    </p>
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/issues_test.go

    	}
    }
    
    func TestIssue25627(t *testing.T) {
    	const prefix = `package p; import "unsafe"; type P *struct{}; type I interface{}; type T `
    	// The src strings (without prefix) are constructed such that the number of semicolons
    	// plus one corresponds to the number of fields expected in the respective struct.
    	for _, src := range []string{
    		`struct { x Missing }`,
    		`struct { Missing }`,
    		`struct { *Missing }`,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  5. doc/go_spec.html

    may trigger the insertion of a <a href="#Semicolons">semicolon</a>.
    While breaking the input into tokens,
    the next token is the longest sequence of characters that form a
    valid token.
    </p>
    
    <h3 id="Semicolons">Semicolons</h3>
    
    <p>
    The formal syntax uses semicolons <code>";"</code> as terminators in
    a number of productions. Go programs may omit most of these semicolons
    using the following two rules:
    </p>
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (1)
  6. src/cmd/compile/internal/syntax/parser.go

    	s.pos = p.pos()
    	s.Label = label
    
    	p.want(_Colon)
    
    	if p.tok == _Rbrace {
    		// We expect a statement (incl. an empty statement), which must be
    		// terminated by a semicolon. Because semicolons may be omitted before
    		// an _Rbrace, seeing an _Rbrace implies an empty statement.
    		e := new(EmptyStmt)
    		e.pos = p.pos()
    		s.Stmt = e
    		return s
    	}
    
    	s.Stmt = p.stmtOrNil()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  7. src/net/http/server.go

    // AllowQuerySemicolons returns a handler that serves requests by converting any
    // unescaped semicolons in the URL query to ampersands, and invoking the handler h.
    //
    // This restores the pre-Go 1.17 behavior of splitting query parameters on both
    // semicolons and ampersands. (See golang.org/issue/25192). Note that this
    // behavior doesn't match that of many proxies, and the mismatch can lead to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  8. src/net/http/httputil/reverseproxy_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	proxyHandler := newProxy(backendURL)
    	frontend := httptest.NewServer(proxyHandler)
    	defer frontend.Close()
    
    	// Don't spam output with logs of queries containing semicolons.
    	backend.Config.ErrorLog = log.New(io.Discard, "", 0)
    	frontend.Config.ErrorLog = log.New(io.Discard, "", 0)
    
    	for _, test := range []struct {
    		rawQuery   string
    		cleanQuery string
    	}{{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 54.6K bytes
    - Viewed (0)
  9. src/net/http/serve_test.go

    	writeBackX := func(w ResponseWriter, r *Request) {
    		x := r.URL.Query().Get("x")
    		if expectParseFormErr {
    			if err := r.ParseForm(); err == nil || !strings.Contains(err.Error(), "semicolon") {
    				t.Errorf("expected error mentioning semicolons from ParseForm, got %v", err)
    			}
    		} else {
    			if err := r.ParseForm(); err != nil {
    				t.Errorf("expected no error from ParseForm, got %v", err)
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  10. src/go/parser/testdata/issue34946.src

    // body's opening { on a new line.
    
    package p
    
    // accept Allman/BSD-style declaration but complain
    // (implicit semicolon between signature and body)
    func _() int
    { /* ERROR "unexpected semicolon or newline before {" */
    	{ return 0 }
    }
    
    func _() {}
    
    func _(); { /* ERROR "unexpected semicolon or newline before {" */ }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 12:56:53 UTC 2023
    - 608 bytes
    - Viewed (0)
Back to top