scanner

package
v0.0.0-...-f469397 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package scanner implements a lexical scanner for Gor source text.

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 responsible for scanning source code text and breaking it down into recognized tokens.

func (*Scanner) Init

func (s *Scanner) Init(file *gotoken.File, src []byte, eh goscan.ErrorHandler)

Init resets and initializes the scanner so it can be reused.

func (*Scanner) Scan

func (s *Scanner) Scan() (pos gotoken.Pos, tok token.Token, lit string)

Scan the next token while returning the position and literal value.

Jump to

Keyboard shortcuts

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