- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for IsIdentRune (0.27 sec)
-
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) -
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) -
api/go1.4.txt
pkg testing, method (*M) Run() int pkg testing, type M struct # CL 108030044 text/scanner: provide facility for custom identifiers, Robert Griesemer <******@****.***> pkg text/scanner, type Scanner struct, IsIdentRune func(int32, int) bool # CL 130620043 text/template: add back pointer to Nodes for better error generation, Rob Pike <******@****.***> pkg text/template/parse, type DotNode struct, embedded NodeType
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 12 03:01:01 UTC 2014 - 34K bytes - Viewed (0)