Documentation ¶
Overview ¶
Package lexgo implements a simple lexer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnterminatedString = errors.New("unterminated string") ErrUnterminatedChar = errors.New("unterminated char") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config[T constraints.Unsigned] struct { Invalid T Error T EOF T Unsigned T String T Identifier T All map[T]string }
type Lexer ¶
type Lexer[T constraints.Unsigned] struct { Error error Location Location String string // identifier, comment, string literal ValueFormat ValueFormat Unsigned uint64 // contains filtered or unexported fields }
type ValueFormat ¶
type ValueFormat uint8
const ( Decimal ValueFormat = iota // 123 Hexadecimal // 0x Binary // 0b Character // ' ' )
func (ValueFormat) Format ¶
func (f ValueFormat) Format(v uint64) string
Click to show internal directories.
Click to hide internal directories.