scanner

package
v0.0.0-...-8229079 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2016 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scanner

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

Scanner is a lexical scanner for scanning configuration files. This works only on UTF-& text.

func NewScanner

func NewScanner(src io.Reader) *Scanner

NewScanner takes src and returns a new Scanner.

func (*Scanner) Scan

func (s *Scanner) Scan() (*ast.Token, error)

Scan returns a new token for every call by advancing on the consumed UTF-8 encoded input text.

Anything after ; is considered a comment. White space is preserved together with new lines. New lines and spaces are interpreted differently.

Jump to

Keyboard shortcuts

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