lexer

package
v0.0.0-...-4926b86 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NA           uint8 = 0
	DataType     uint8 = 1
	Id           uint8 = 2
	Brace        uint8 = 3
	Ret          uint8 = 4
	SemiColon    uint8 = 5
	Value        uint8 = 6
	Operator     uint8 = 7
	Comma        uint8 = 8
	Const        uint8 = 9
	Type         uint8 = 10
	Colon        uint8 = 11
	At           uint8 = 12
	New          uint8 = 13
	Free         uint8 = 14
	Iter         uint8 = 15
	Break        uint8 = 16
	Continue     uint8 = 17
	In           uint8 = 18
	If           uint8 = 19
	Else         uint8 = 20
	Volatile     uint8 = 21
	Comment      uint8 = 22
	Use          uint8 = 23
	Dot          uint8 = 24
	Pub          uint8 = 25
	Preprocessor uint8 = 26
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

type Lexer struct {
	File   *jnio.File
	Pos    int
	Column int
	Row    int
	Logs   []jnlog.CompilerLog
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(f *jnio.File) *Lexer

func (*Lexer) Lexer

func (lex *Lexer) Lexer() []Token

func (*Lexer) NewLine

func (lex *Lexer) NewLine()

func (*Lexer) Token

func (lex *Lexer) Token() Token

type Token

type Token struct {
	File   *jnio.File
	Row    int
	Column int
	Kind   string
	Id     uint8
}

Jump to

Keyboard shortcuts

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