Home | History | Annotate | Download | only in scanner

Lines Matching defs:Scanner

5 // Package scanner implements a scanner for Go source text.
9 package scanner
21 // An ErrorHandler may be provided to Scanner.Init. If a syntax error is
28 // A Scanner holds the scanner's internal state while processing
32 type Scanner struct {
56 func (s *Scanner) next() {
89 // They control scanner behavior.
98 // Init prepares the scanner s to tokenize the text src by setting the
99 // scanner at the beginning of src. The scanner uses the file set file
107 // the Scanner field ErrorCount is incremented by one. The mode parameter
113 func (s *Scanner) Init(file *token.File, src []byte, err ErrorHandler, mode Mode) {
114 // Explicitly initialize all fields since a scanner may be reused.
137 func (s *Scanner) error(offs int, msg string) {
146 func (s *Scanner) interpretLineComment(text []byte) {
160 // update scanner position
167 func (s *Scanner) scanComment() string {
213 func (s *Scanner) findLineEnd() bool {
217 // reset scanner state to where it was upon calling findLineEnd
265 func (s *Scanner) scanIdentifier() string {
285 func (s *Scanner) scanMantissa(base int) {
291 func (s *Scanner) scanNumber(seenDecimalPoint bool) (token.Token, string) {
372 func (s *Scanner) scanEscape(quote rune) bool {
425 func (s *Scanner) scanRune() string {
461 func (s *Scanner) scanString() string {
495 func (s *Scanner) scanRawString() string {
523 func (s *Scanner) skipWhitespace() {
535 func (s *Scanner) switch2(tok0, tok1 token.Token) token.Token {
543 func (s *Scanner) switch3(tok0, tok1 token.Token, ch2 rune, tok2 token.Token) token.Token {
555 func (s *Scanner) switch4(tok0, tok1 token.Token, ch2 rune, tok2, tok3 token.Token) token.Token {
595 // must check the scanner's ErrorCount or the number of calls
602 func (s *Scanner) Scan() (pos token.Pos, tok token.Token, lit string) {