lexer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package lexer implements a lexer for ClickHouse SQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Token  token.Token
	Value  string
	Pos    token.Position
	Quoted bool // true if this identifier was double-quoted
}

Item represents a lexical token with its value and position.

func Tokenize

func Tokenize(r io.Reader) []Item

Tokenize returns all tokens from the reader.

type Lexer

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

Lexer tokenizes ClickHouse SQL input.

func New

func New(r io.Reader) *Lexer

New creates a new Lexer from an io.Reader.

func (*Lexer) NextToken

func (l *Lexer) NextToken() Item

NextToken returns the next token from the input.

Jump to

Keyboard shortcuts

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