lexer

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

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 - represents a lexical analyzer for the input source code.

func NewLexer

func NewLexer(input string) (l *Lexer)

NewLexer - creates a new Lexer instance with the given input source code.

func (*Lexer) GetColumnPosition

func (l *Lexer) GetColumnPosition() int

GetColumnPosition - returns the current column position of the Lexer in the input source code.

func (*Lexer) GetLinePosition

func (l *Lexer) GetLinePosition() int

GetLinePosition - returns the current line position of the Lexer in the input source code.

func (*Lexer) NextToken

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

NextToken returns the next token from the input string

Jump to

Keyboard shortcuts

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