Lines Matching defs:scanner
246 type scanner struct { struct
247 rest []byte // rest of input (in REPL, a line of input)
248 token []byte // token being scanned
249 pos Position // current input position
250 depth int // nesting of [ ] { } ( )
251 indentstk []int // stack of indentation levels
252 dents int // number of saved INDENT (>0) or OUTDENT (<0) tokens to return
253 lineStart bool // after NEWLINE; convert spaces to indentation tokens
254 keepComments bool // accumulate comments in slice
255 lineComments []Comment // list of full line comments (if keepComments)
256 suffixComments []Comment // list of suffix comments (if keepComments)
258 readline func() ([]byte, error) // read next line of input (REPL only)
315 func (sc *scanner) error(pos Position, s string) {
319 func (sc *scanner) errorf(pos Position, format string, args ...interface{}) {
323 func (sc *scanner) recover(err *error) {
342 func (sc *scanner) eof() bool {
348 func (sc *scanner) readLine() bool {
362 func (sc *scanner) peekRune() rune {
382 func (sc *scanner) readRune() rune {
433 func (sc *scanner) startToken(val *tokenValue) {
442 func (sc *scanner) endToken(val *tokenValue) {
456 func (sc *scanner) nextToken(val *tokenValue) Token {
827 func (sc *scanner) scanString(val *tokenValue, quote rune) Token {
910 func (sc *scanner) scanNumber(val *tokenValue, c rune) Token {