lexer

package
v0.0.0-...-2c8557b Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EOF = iota
	NEWLINE
	COMMENT
	LPAREN
	RPAREN
	LBRACE
	RBRACE
	LBRACKET
	RBRACKET
	DOT
	RANGE
	PLUS
	MINUS
	DIVIDE
	ASTERISK
	MOD
	CARET
	TILDE
	SHIFTLEFT
	SHIFTRIGHT
	AMPERSAND
	PIPE
	LT
	LTE
	GT
	GTE
	EQUAL
	NOTEQUAL
	CONTAINS
	ICONTAINS
	STARTSWITH
	ISTARTSWITH
	ENDSWITH
	IENDSWITH
	IEQUALS
	MATCHES
	NOTDEFINED
	AND
	OR
	COMMA
	COLON
	ASSIGNMENT
	INTEGER
	IDENTITY
	VARIABLE
	STRING
	REGEX
	BOOL
	NOCASE
	WIDE
	ASCII
	XOR
	BASE64
	BASE64WIDE
	FULLWORD
	PRIVATE
	ALL
	ANY
	AT
	CONDITION
	GLOBAL
	STRINGS
	INT16
	INT16BE
	INT32
	INT32BE
	INT8
	INT8BE
	UINT16
	UINT16BE
	UINT32
	UINT32BE
	UINT8
	UINT8BE
	META
	NONE
	OF
	RULE
	THEM
	ENTRYPOINT
	FILESIZE
	FOR
	IMPORT
	INCLUDE
	IN
	NOT
	DEFINED
	KB
	MB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func New

func New(input string) *Lexer

func (*Lexer) HasNext

func (s *Lexer) HasNext() bool

func (*Lexer) Next

func (s *Lexer) Next() (*Token, error)

func (*Lexer) Peek

func (s *Lexer) Peek() (*Token, error)

type Token

type Token struct {
	Raw  string
	Type int
	Row  int
	Col  int
}

Jump to

Keyboard shortcuts

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