scanner

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package scanner implements a tokeniser for lua. Inspired by https://talks.golang.org/2011/lex.slide#1

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 holds the state of the scanner.

func New

func New(name string, input []byte) *Scanner

New creates a new scanner for the input string.

func (*Scanner) ErrorMsg

func (l *Scanner) ErrorMsg() string

ErrorMsg returns the current error message or an empty string if there is none.

func (*Scanner) Scan

func (l *Scanner) Scan() *token.Token

Scan returns the next item from the input (or nil)

Jump to

Keyboard shortcuts

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