scanner

package
v0.0.0-...-4cc5765 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error = token.Error

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func (*Scanner) ClearErrors

func (s *Scanner) ClearErrors()

clear accumulated errors

func (*Scanner) Error

func (s *Scanner) Error(pos token.Pos, msg string) *Error

func (*Scanner) Errors

func (s *Scanner) Errors() token.ErrorList

return accumulated errors

func (*Scanner) File

func (s *Scanner) File() *token.File

func (*Scanner) Init

func (s *Scanner) Init(file *token.File, src io.Reader)

(re)initialize internal buffers, then set io.Reader does NOT clear accumulated errors

func (*Scanner) PosEnd

func (s *Scanner) PosEnd() (token.Pos, token.Pos)

return position of begin and end of last returned token

func (*Scanner) Position

func (s *Scanner) Position(pos token.Pos) token.Position

convert specified Pos to a Position

func (*Scanner) Scan

func (s *Scanner) Scan() (token.Token, string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL