Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for newline (0.56 sec)

  1. src/cmd/asm/internal/lex/input.go

    				acceptArg = false
    			default:
    				in.Error("bad definition for macro:", name)
    			}
    		}
    	}
    	var tokens []Token
    	// Scan to newline. Backslashes escape newlines.
    	for tok != '\n' {
    		if tok == scanner.EOF {
    			in.Error("missing newline in definition for macro:", name)
    		}
    		if tok == '\\' {
    			tok = in.Stack.Next()
    			if tok != '\n' && tok != '\\' {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  2. src/bufio/scan.go

    			if len(s.buf) >= s.maxTokenSize || len(s.buf) > maxInt/2 {
    				s.setErr(ErrTooLong)
    				return false
    			}
    			newSize := len(s.buf) * 2
    			if newSize == 0 {
    				newSize = startBufSize
    			}
    			newSize = min(newSize, s.maxTokenSize)
    			newBuf := make([]byte, newSize)
    			copy(newBuf, s.buf[s.start:s.end])
    			s.buf = newBuf
    			s.end -= s.start
    			s.start = 0
    		}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  3. src/cmd/cgo/godefs.go

    // semicolon at each newline, so we can replace newline with semicolon.
    // However, we can't do that in cases where the lexer would not insert
    // a semicolon. We only have to worry about cases that can occur in an
    // expression passed through gofmt, which means composite literals and
    // (due to the printer possibly inserting newlines because of position
    // information) operators.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/lex/lex.go

    // A TokenReader is like a reader, but returns lex tokens of type Token. It also can tell you what
    // the text of the most recently returned token is, and where it was found.
    // The underlying scanner elides all spaces except newline, so the input looks like a stream of
    // Tokens; original spacing is lost but we don't need it.
    type TokenReader interface {
    	// Next returns the next token.
    	Next() ScanToken
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  5. src/builtin/builtin.go

    func print(args ...Type)
    
    // The println built-in function formats its arguments in an
    // implementation-specific way and writes the result to standard error.
    // Spaces are always added between arguments and a newline is appended.
    // Println is useful for bootstrapping and debugging; it is not guaranteed
    // to stay in the language.
    func println(args ...Type)
    
    // The error built-in interface type is the conventional interface for
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  6. src/cmd/asm/internal/lex/lex_test.go

    	},
    	{
    		"#define A() A()\nA()",
    		"recursive macro invocation",
    	},
    	{
    		"#define A a\n#define A a\n",
    		"redefinition of macro",
    	},
    	{
    		"#define A a",
    		"no newline after macro definition",
    	},
    }
    
    func TestBadLex(t *testing.T) {
    	for _, test := range badLexTests {
    		input := NewInput(test.error)
    		input.Push(NewTokenizer(test.error, strings.NewReader(test.input), nil))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/asm/parse.go

    next:
    	// Skip newlines.
    	var tok lex.ScanToken
    	for {
    		tok = p.nextToken()
    		// We save the line number here so error messages from this instruction
    		// are labeled with this line. Otherwise we complain after we've absorbed
    		// the terminating newline and the line numbers are off by one in errors.
    		p.lineNum = p.lex.Line()
    		switch tok {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  8. doc/go_spec.html

    </p>
    
    <h3 id="Characters">Characters</h3>
    
    <p>
    The following terms are used to denote specific Unicode character categories:
    </p>
    <pre class="ebnf">
    newline        = /* the Unicode code point U+000A */ .
    unicode_char   = /* an arbitrary Unicode code point except newline */ .
    unicode_letter = /* a Unicode code point categorized as "Letter" */ .
    unicode_digit  = /* a Unicode code point categorized as "Number, decimal digit" */ .
    </pre>
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 00:39:16 GMT 2024
    - 279.6K bytes
    - Viewed (0)
  9. src/cmd/asm/internal/lex/tokenizer.go

    }
    
    func NewTokenizer(name string, r io.Reader, file *os.File) *Tokenizer {
    	var s scanner.Scanner
    	s.Init(r)
    	// Newline is like a semicolon; other space characters are fine.
    	s.Whitespace = 1<<'\t' | 1<<'\r' | 1<<' '
    	// Don't skip comments: we need to count newlines.
    	s.Mode = scanner.ScanChars |
    		scanner.ScanFloats |
    		scanner.ScanIdents |
    		scanner.ScanInts |
    		scanner.ScanStrings |
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Aug 04 20:35:21 GMT 2022
    - 3K bytes
    - Viewed (0)
  10. src/cmd/cgo/ast.go

    						// This should have been checked when the file path was first resolved,
    						// but we double check here just to be sure.
    						fatalf("internal error: ParseGo: abspath contains unexpected newline character: %q", abspath)
    					}
    					f.Preamble += fmt.Sprintf("#line %d %q\n", sourceLine(cg), abspath)
    					f.Preamble += commentText(cg) + "\n"
    					f.Preamble += "#line 1 \"cgo-generated-wrapper\"\n"
    				}
    			}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
Back to top