Documentation ¶
Overview ¶
Package lexer contains the code to lex input programs into a stream of tokens. The stream of tokens can then be parsed into an AST.
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
}
Lexer holds our object-state.
func (*Lexer) GetLineText ¶
GetLineText returns the text of the line containing the given token.
func (*Lexer) Position ¶
Position returns the current read position of the Lexer as a Position object.
func (*Lexer) SetFilename ¶
SetFilename sets the name of the file being read.
type NumberType ¶
type NumberType string
NumberType describes the type of a number that is being lexed.
const ( NumberTypeInvalid NumberType = "invalid" NumberTypeDecimal NumberType = "decimal" NumberTypeHex NumberType = "hex" NumberTypeBinary NumberType = "binary" )
Click to show internal directories.
Click to hide internal directories.