Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for trailingDigits (0.1 sec)

  1. src/go/scanner/scanner.go

    	// extract comment text
    	if text[1] == '*' {
    		text = text[:len(text)-2] // lop off trailing "*/"
    	}
    	text = text[7:] // lop off leading "//line " or "/*line "
    	offs += 7
    
    	i, n, ok := trailingDigits(text)
    	if i == 0 {
    		return // ignore (not a line directive)
    	}
    	// i > 0
    
    	if !ok {
    		// text has a suffix :xxx but xxx is not a number
    		s.error(offs+i, "invalid line number: "+string(text[i:]))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 24.3K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/parser.go

    	i, n, ok := trailingDigits(text)
    	if i == 0 {
    		return // ignore (not a line directive)
    	}
    	// i > 0
    
    	if !ok {
    		// text has a suffix :xxx but xxx is not a number
    		p.errorAt(p.posAt(tline, tcol+i), "invalid line number: "+text[i:])
    		return
    	}
    
    	var line, col uint
    	i2, n2, ok2 := trailingDigits(text[:i-1])
    	if ok2 {
    		//line filename:line:col
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
Back to top