lexing

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lex added in v0.0.1

func Lex(source io.Reader) chan Token

Types

type Token

type Token struct {
	Type  TokenType
	Value []byte
}

type TokenType

type TokenType string
const (
	TokenIllegal     TokenType = "<ILLEGAL>"
	TokenWhitespace  TokenType = "<whitespace>"
	TokenNull        TokenType = "<null>"
	TokenTrue        TokenType = "<true>"
	TokenFalse       TokenType = "<false>"
	TokenNumber      TokenType = "<number>"
	TokenString      TokenType = "<string>"
	TokenArrayStart  TokenType = "<[>"
	TokenArrayStop   TokenType = "<]>"
	TokenComma       TokenType = "<,>"
	TokenObjectStart TokenType = "<{>"
	TokenObjectStop  TokenType = "<}>"
	TokenColon       TokenType = "<:>"
)

Jump to

Keyboard shortcuts

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