Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for IsIdentRune (0.35 sec)

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

    		scanner.ScanStrings |
    		scanner.ScanComments
    	s.Position.Filename = name
    	s.IsIdentRune = isIdentRune
    	return &Tokenizer{
    		s:    &s,
    		base: src.NewFileBase(name, objabi.AbsFile(objabi.WorkingDir(), name, *flags.TrimPath)),
    		line: 1,
    		file: file,
    	}
    }
    
    // We want center dot (·) and division slash (∕) to work as identifier characters.
    func isIdentRune(ch rune, i int) bool {
    	if unicode.IsLetter(ch) {
    		return true
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 04 20:35:21 UTC 2022
    - 3K bytes
    - Viewed (0)
  2. src/text/scanner/scanner.go

    }
    
    func (s *Scanner) isIdentRune(ch rune, i int) bool {
    	if s.IsIdentRune != nil {
    		return ch != EOF && s.IsIdentRune(ch, i)
    	}
    	return ch == '_' || unicode.IsLetter(ch) || unicode.IsDigit(ch) && i > 0
    }
    
    func (s *Scanner) scanIdentifier() rune {
    	// we know the zero'th rune is OK; start scanning at the next one
    	ch := s.next()
    	for i := 1; s.isIdentRune(ch, i); i++ {
    		ch = s.next()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  3. src/text/scanner/scanner_test.go

    	const src = "faab12345 a12b123 a12 3b"
    	s := new(Scanner).Init(strings.NewReader(src))
    	// ident = ( 'a' | 'b' ) { digit } .
    	// digit = '0' .. '3' .
    	// with a maximum length of 4
    	s.IsIdentRune = func(ch rune, i int) bool {
    		return i == 0 && (ch == 'a' || ch == 'b') || 0 < i && i < 4 && '0' <= ch && ch <= '3'
    	}
    	checkTok(t, s, 1, s.Scan(), 'f', "f")
    	checkTok(t, s, 1, s.Scan(), Ident, "a")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 17 03:41:50 UTC 2022
    - 25.3K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"ScanInts", Const, 0},
    		{"ScanRawStrings", Const, 0},
    		{"ScanStrings", Const, 0},
    		{"Scanner", Type, 0},
    		{"Scanner.Error", Field, 0},
    		{"Scanner.ErrorCount", Field, 0},
    		{"Scanner.IsIdentRune", Field, 4},
    		{"Scanner.Mode", Field, 0},
    		{"Scanner.Position", Field, 0},
    		{"Scanner.Whitespace", Field, 0},
    		{"SkipComments", Const, 0},
    		{"String", Const, 0},
    		{"TokenString", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top