js_lexer

package
v0.0.0-...-73c17ce Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 8 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
}

func NewLexer

func NewLexer(reader io.Reader) Lexer

func (Lexer) Column

func (s Lexer) Column() (int, int)

Column 获取当前的列

func (Lexer) Line

func (s Lexer) Line() (int, int)

Line 获得当前的行号

func (Lexer) Location

func (s Lexer) Location() (int, int, int, int)

func (Lexer) Move

func (s Lexer) Move(n int) byte

Move 移动解析的位置

func (Lexer) Next

func (s Lexer) Next()

Next 解析下一个Token,跳过空格和换行,然后自动增加index 和 line column

func (Lexer) Peek

func (s Lexer) Peek(n int) byte

Peek 查看当前byte

Jump to

Keyboard shortcuts

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