lexer

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ImportedSymbs map[string]uint8 = make(map[string]uint8)

Functions

This section is empty.

Types

type Lexer

type Lexer struct {
	Content      string
	Content_len  int
	Cursor       int
	Line         int
	LineStart    int
	KeywordsTree *map[string]uint8
}

func LexerInit

func LexerInit(content string, tree *map[string]uint8) *Lexer

func (*Lexer) ChopChar

func (l *Lexer) ChopChar(len int)

func (*Lexer) FormatCode

func (l *Lexer) FormatCode(tokens *[]*Token, swap *map[string]string) (res string)

func (*Lexer) GetTokenContent

func (l *Lexer) GetTokenContent(token *Token) string

func (*Lexer) GetTokens

func (l *Lexer) GetTokens() *[]*Token

func (*Lexer) NextToken

func (l *Lexer) NextToken() *Token

func (*Lexer) SetContent

func (l *Lexer) SetContent(content string)

func (*Lexer) Trim

func (l *Lexer) Trim()

Jump to

Keyboard shortcuts

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