scanner

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 2 Imported by: 0

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 transforms our source code into tokens.

func New

func New(source string, file string) *Scanner

New creates a new scanner instance.

func (*Scanner) ScanToken

func (scanner *Scanner) ScanToken() token.Token

scanToken is responsible for scanning the current character and storing the correct token type for it. This is the heart of our scanner.

Jump to

Keyboard shortcuts

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