lexer

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package lexer contains the code to lex input-programs into a stream of tokens, such that they may be parsed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

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

Lexer holds our object-state.

func New

func New(input string) *Lexer

New a Lexer instance from string input.

func (*Lexer) GetLine

func (l *Lexer) GetLine() int

GetLine returns the rough line-number of our current position.

func (*Lexer) NextToken

func (l *Lexer) NextToken() token.Token

NextToken to read next token, skipping the white space.

Jump to

Keyboard shortcuts

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