Documentation
¶
Index ¶
- Constants
- Variables
- type Scanner
- func (s *Scanner) Eof() bool
- func (s *Scanner) Errorf(format string, args ...interface{}) error
- func (s *Scanner) Peek() rune
- func (s *Scanner) PeekN(n int) []rune
- func (s *Scanner) Pos() int
- func (s *Scanner) Scan(re *regexp.Regexp) (string, bool)
- func (s *Scanner) ScanChar() (rune, bool)
- func (s *Scanner) ScanFloat64() (float64, bool)
- func (s *Scanner) ScanIdentifier() (string, bool)
- func (s *Scanner) ScanInt64() (int64, bool)
- func (s *Scanner) ScanQuoteString() (string, bool)
- func (s *Scanner) ScanString() (string, bool)
- func (s *Scanner) ScanToEnd() string
- func (s *Scanner) ScanUntil(delim rune, included bool) (string, bool)
- func (s *Scanner) SkipWhitespaces() bool
Constants ¶
View Source
const ( // EOF represents the end of input EOF rune = -1 )
Variables ¶
View Source
var ( ErrEOF = errors.New("reach at EOF") ErrRuneError = errors.New("utf8 rune decode error") )
Functions ¶
This section is empty.
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner provides a convenient interface for reading unicode data using regexp match
func (*Scanner) ScanFloat64 ¶
ScanFloat64 returns an float64
func (*Scanner) ScanIdentifier ¶
ScanIdentifier returns an identifier
func (*Scanner) ScanQuoteString ¶
ScanQuoteString returns an quote string
func (*Scanner) ScanString ¶
ScanString returns a string, the string can be quoted by '"', '\”, '`'
func (*Scanner) SkipWhitespaces ¶
SkipWhitespaces skips whitespaces, and returns true if skipped > 0
Click to show internal directories.
Click to hide internal directories.