Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 701 for comment1 (0.25 sec)

  1. src/go/printer/testdata/comments.input

    // comments).
    func _() {
    	_ = T{
    		1,    // comment after comma
    		2,    /* comment after comma */
    		3  ,  // comment after comma
    	}
    	_ = T{
    		1  ,// comment after comma
    		2  ,/* comment after comma */
    		3,// comment after comma
    	}
    	_ = T{
    		/* comment before literal */1,
    		2/* comment before comma - ok to move after comma */,
    		3  /* comment before comma - ok to move after comma */  ,
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 25 23:11:14 UTC 2022
    - 11.3K bytes
    - Viewed (0)
  2. src/go/printer/testdata/comments.golden

    // comments).
    func _() {
    	_ = T{
    		1,	// comment after comma
    		2,	/* comment after comma */
    		3,	// comment after comma
    	}
    	_ = T{
    		1,	// comment after comma
    		2,	/* comment after comma */
    		3,	// comment after comma
    	}
    	_ = T{
    		/* comment before literal */ 1,
    		2,	/* comment before comma - ok to move after comma */
    		3,	/* comment before comma - ok to move after comma */
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 25 23:11:14 UTC 2022
    - 11.3K bytes
    - Viewed (0)
  3. src/text/template/parse/parse_test.go

    	// Specific errors.
    	{"function",
    		"{{foo}}",
    		hasError, `function "foo" not defined`},
    	{"comment1",
    		"{{/*}}",
    		hasError, `comment1:1: unclosed comment`},
    	{"comment2",
    		"{{/*\nhello\n}}",
    		hasError, `comment2:1: unclosed comment`},
    	{"lparen",
    		"{{.X (1 2 3}}",
    		hasError, `unclosed left paren`},
    	{"rparen",
    		"{{.X 1 2 3 ) }}",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 24 21:59:12 UTC 2024
    - 24K bytes
    - Viewed (0)
  4. src/go/build/build_test.go

    // TestIssue56509 tests that go/build does not add non-go files to InvalidGoFiles
    // when they have unparsable comments.
    func TestIssue56509(t *testing.T) {
    	// The directory testdata/bads contains a .s file that has an unparsable
    	// comment. (go/build parses initial comments in non-go files looking for
    	// //go:build or //+go build comments).
    	p, err := ImportDir("testdata/bads", 0)
    	if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 15 16:24:01 UTC 2023
    - 23.9K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/mod/modfile/read.go

    }
    
    // Comments collects the comments associated with an expression.
    type Comments struct {
    	Before []Comment // whole-line comments before this expression
    	Suffix []Comment // end-of-line comments after this expression
    
    	// For top-level expressions only, After lists whole-line
    	// comments following the expression.
    	After []Comment
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  6. .github/actions/notify-translations/app/main.py

            )
            for comment in comments:
                if new_translation_message in comment.body:
                    already_notified_comment = comment
                elif done_translation_message in comment.body:
                    already_done_comment = comment
            logging.info(
                f"Already notified comment: {already_notified_comment}, already done comment: {already_done_comment}"
            )
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Sep 27 23:01:46 UTC 2023
    - 12.4K bytes
    - Viewed (0)
  7. src/go/printer/printer_test.go

    	comment := f.Comments[0].List[0]
    	pos := comment.Pos()
    	if fset.PositionFor(pos, false /* absolute position */).Offset != 1 {
    		t.Error("expected offset 1") // error in test
    	}
    
    	testComment(t, f, len(src), &ast.Comment{Slash: pos, Text: "//-style comment"})
    	testComment(t, f, len(src), &ast.Comment{Slash: pos, Text: "/*-style comment */"})
    	testComment(t, f, len(src), &ast.Comment{Slash: pos, Text: "/*-style \n comment */"})
    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. src/go/printer/printer.go

    		for i < len(comments) && comments[i].End() < beg {
    			i++
    		}
    		j := i
    		for j < len(comments) && comments[j].Pos() < end {
    			j++
    		}
    		if i < j {
    			p.comments = comments[i:j]
    		}
    	} else if n, ok := node.(*ast.File); ok {
    		// use ast.File comments, if any
    		p.comments = n.Comments
    	}
    
    	// if there are no comments, use node comments
    	p.useNodeComments = p.comments == nil
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 41.6K bytes
    - Viewed (0)
  9. src/go/ast/ast.go

    	if g == nil {
    		return ""
    	}
    	comments := make([]string, len(g.List))
    	for i, c := range g.List {
    		comments[i] = c.Text
    	}
    
    	lines := make([]string, 0, 10) // most comments are less than 10 lines
    	for _, c := range comments {
    		// Remove comment markers.
    		// The parser has given us exactly the comment text.
    		switch c[1] {
    		case '/':
    			//-style comment (no newline at the end)
    			c = c[2:]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/imports.go

    				delspecs = delspecs[:len(delspecs)-1]
    				i--
    				break
    			}
    		}
    	}
    
    	// Delete comments from f.Comments.
    	for i := 0; i < len(f.Comments); i++ {
    		cg := f.Comments[i]
    		for j, del := range delcomments {
    			if cg == del {
    				copy(f.Comments[i:], f.Comments[i+1:])
    				f.Comments = f.Comments[:len(f.Comments)-1]
    				copy(delcomments[j:], delcomments[j+1:])
    				delcomments = delcomments[:len(delcomments)-1]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 10 21:56:21 UTC 2022
    - 13.4K bytes
    - Viewed (0)
Back to top