- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for IsIdentRune (0.17 sec)
-
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) -
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/example_test.go
fmt.Printf("%s: %s\n", s.Position, s.TokenText()) } fmt.Println() s.Init(strings.NewReader(src)) s.Filename = "percent" // treat leading '%' as part of an identifier s.IsIdentRune = func(ch rune, i int) bool { return ch == '%' && i == 0 || unicode.IsLetter(ch) || unicode.IsDigit(ch) && i > 0 } for tok := s.Scan(); tok != scanner.EOF; tok = s.Scan() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Mar 10 02:01:58 UTC 2018 - 2.7K 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) -
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)