lexer

package
v0.0.0-...-1ed018b Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package lexer turns source bytes into tokens.

Phase 0 carries the seeds of MRI's stateful lexer — SpaceBefore on every token and a lexState field — without yet exercising the hard cases (regex vs division, heredocs, interpolation). Those land in later phases (plan §10); the state plumbing is here from the start so they slot in without a rewrite.

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
}

func New

func New(src string) *Lexer

func (*Lexer) Tokenize

func (l *Lexer) Tokenize() []token.Token

Tokenize returns the full token stream, terminated by an EOF token.

Jump to

Keyboard shortcuts

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